JPG to video stream. J2ME.

B

Boki

Hi All,
I need a java code/example/hint that can decode jpg data file
continusly.
How is the decode speed in phones, I wan to decode a lot jpg from my webcam
to become a vidoe stream.

Best regards,
Boki.
 
J

JScoobyCed

Hi,

I have started such a work in the beginning of the year. The goal was
to simulate a video stream over bluetooth.
My current status is to send one frame per one frame to the computer (on
windows XP, using a modified Bluecove library). The problem is that I
can't get my Phone camera take snapshot without the need of the user
confirmation. So the user has to press "Yes" to autorize the snapshot to
be taken, then I send to the computer (or another phone BT connected)
and display image per image.
 
B

Boki

Hi,
Great thanks. I think my target is much easier, I have a lot of
incoming jpg data, I want to decode them to screen directly, my target is:

Bluetooth device send continusly jpg pictures to phone.

I think I can skip Bluecove, right? because it seems that needs a license.

Best regards,
Boki.
 
R

Roedy Green

I need a java code/example/hint that can decode jpg data file
continusly.
How is the decode speed in phones, I wan to decode a lot jpg from my webcam
to become a vidoe stream.

You can download the source for NetworkCam at
http://mindprod.com/products1.html#NETWORKCAM which works by asking
periodically for a new JPG.

I am not permitted to post the code I did for continous stream.
Basically you collect the bytes from a socket then:

BufferedImage image = ImageIO.read ( new ByteArrayInputStream (
rawImage ) );

I don't know what the J2ME equivalents are.
 
B

Boki

I remember it will show a special message every time... , isn't it ?

And I will sell this prodcut finally, I guess I can't use that..

And, I have to say sorry, I am developing with J2SE... not J2ME... so I
think I can skip that, isn't it? :D


Best regards,
Boki.
 
B

bokiteam

Can I decode byte by byte, or need a complete jpg file then ?

Thanks a lot for the reference!

Best regards,
Boki.

Roedy Green 寫é“:
 
R

Roedy Green

Can I decode byte by byte, or need a complete jpg file then

Keep in mind what I am saying is for Desktop Java.

the BufferedArrayStream method I showed you would not start analysing
the jpg until the entire file hand arrived.

It is possible with an Image to start painting right away and keep
repainting as more image arrives.

see http://mindprod.com/jgloss/image.html

for streams of images the user wants to transition between images to
be snappy. He does not want to see the second image gradually forming
on screen with ugly artifacts. He would rather continue admiring the
first image until the second one is ready to blast on screen.
 
B

bokiteam

;) thank you ! :)

Roedy said:
Keep in mind what I am saying is for Desktop Java.

the BufferedArrayStream method I showed you would not start analysing
the jpg until the entire file hand arrived.

It is possible with an Image to start painting right away and keep
repainting as more image arrives.

see http://mindprod.com/jgloss/image.html

for streams of images the user wants to transition between images to
be snappy. He does not want to see the second image gradually forming
on screen with ugly artifacts. He would rather continue admiring the
first image until the second one is ready to blast on screen.
 
B

bokiteam

Hi Green,
The main reason that why I want to decode byte by byte
is because I am afraid the processing speed is not high enough, so, I
want to save the processing time ( CPU is almost idle when it is
receiving stream data only )

Am I right? or the phone speed is high enough to deocde 30fps jpg ?

Best regards,
Boki.
 
R

Roedy Green

Did you demo this on a website?
the simple static JPG viewer you can see at
http://mindprod.com/applets/networkcam.html

The super high speed one with ability to remotely control the hundreds
of cameras, zooms, pans, tilts, motion detection etc. for some reason
I can't fathom, the guy I did it for does not want it publicly known.
He is interested only in local sales with complete hardware and
installation.

Sometimes I wonder if the secrecy is to disguise from me that I
created an interactive porn viewer. It had no billing hooks though. I
created it with the idea of security cameras in mind.
 
R

Roedy Green

Am I right? or the phone speed is high enough to deocde 30fps jpg ?

It depends on transmission speed, video hardware, cpu, cpu extensions
and of course image size/resolution.

JPG is not designed for full motion video. For that you want an MPG
stream that just sends the changes between frames. IF you visit any
porn site and watch the MPG or similar streaming video, you can get an
idea what is possible with various sorts of resolution and connection.
Don't forget to put in your "research" hours to your boss.

Usually for full motion MPG you prepare the stream off line or use
hardware to do it real time. See
http://mindprod.com/jgloss/mobea.html


see http://mindprod.com/jgloss/jaf.html

You can experiment with my simple JPG webcam viewer to get an idea of
just how slow JPGs are. I think you will be pretty disappointed.

Just think of what how many images per second a browser can render
over a phone line each second. Java won't beat that with JPG.
 
B

bokiteam

Hi Green,
My app is transferring data over Bluetooth :) Do you
think that is possible? Here is the spec:

Resolution: 176x220 or 160x120
Speed: RF: Bluetooth ( No EDR ) , Baseband: UART 921Kbps.

The result under uart transmission directly is smooth.

Right now, I have to connect Bluetooth and coding java code for phone
devices.

I think it is OK to satisfy data rate requirement, one thing I can't
calculate is Phone decode jpg speed. :)

so, I have to try .... or somebody can tell me directly :D

Best regards,
Boki.
 
B

Boki

Ya, thanks.
I will try to load different jpg pictures on mobile device locally first.

As long as the decode speed is enoughs, I think the transmission on
Bluetooth is not a problem.

because, I have averaged the QQVGA file size, they are only 5KB. :)

Best regards,
Boki.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top