views:

64

answers:

1

I have a camera that is taking pictures one by one (about 10 pictures per second) and sending them to PC. I need to show this incoming sequence of images as a live video in PC.

Is it enough just to use some Python GUI framework, create a control that will hold a single image and just change the image in the control very fast?

Or would that be just lame? Should I use some sort of video streaming library? If yes, what do you recommend?

+1  A: 

Or would that be just lame?

No. It wouldn't work at all.

There's a trick to getting video to work. Apple's QuickTime implements that trick. So does a bunch of Microsoft product. Plus some open source video playback tools.

There are several closely-related tricks, all of which are a huge pain in the neck.

  1. Compression. Full-sized video is Huge. Do the math 640x480x24-bit color at 30 frames per second. It adds up quickly. Without compression, you can't read it in fast enough.

  2. Buffering and Timing. Sometimes the data rates and frame rates don't align well. You need a buffer of ready-to-display frames and you need a deadly accurate clock to get them do display at exactly the right intervals.

Making a sequence of JPEG images into a movie is what iPhoto and iMovie are for.

Usually, what we do is create the video file from the image and play the video file through a standard video player. Making a QuickTime movie or Flash movie from images isn't that hard. There are a lot of tools to help make movies from images. Almost any photo management solution can create a slide show and save it as a movie in some standard format.

Indeed, I think that Graphic Converter can do this.

S.Lott
I need the video to be a live stream (i.e. I see on the PC what camera sees right now). So I guess I will need to use some video streaming library for that.
Richard Knop
"I have a flow of JPEG images". "I need the video to be a live stream". I can't follow your requirements. They appear contradictory. At the very least they're incomplete. Please **update** the question to have **all** the relevant information.
S.Lott
I don't know how to explain it better. The camera is taking pictures one by one and sending them to a PC. I need to show a live video from these images (camera takes about 10 images per second). I will update my question.
Richard Knop
@Richard Knop: "I don't know how to explain it better." That's not the issue. Until your latest update, you didn't explain it at all. We can't read minds. So without **details**, we can only guess. And in this case, more details would be helpful, since what you're asking for isn't proper video (30 fps), yet you want it in "real" time. You have a seriously complex problem and you need to provide details.
S.Lott
@S.Lott I have tried to explain everything in much more detail in my new question: http://stackoverflow.com/questions/4035365/live-video-stream-on-server-pc-from-images-sent-by-robot-through-udp
Richard Knop