views:

72

answers:

1

I have an application that captures analog measurements several times a second - to give you an idea how it looks like - here is a sample frame (obviously the curve changes as the measurements chage):

alt text

I need this application to record these frames into an AVI or any other video file that would be playable on windows without a custom codec.

I've thought of just creating a huge animated GIF file but rewind/pause capability is a must. FLV also will not do.

Is there any codec out there that would be:

  • best suited to this kind of video (3-4 colors with no dithering, minimal changes frame-to-frame, about 4-8 fps)
  • readily available in Windows Media Player
  • available as a library for linux to encode the files

Any advice would be much appreciated.

+1  A: 

My first thought is: you might have a requirements problem.

If one requirement is "readily available in Windows Media Player," that really narrows the field quite a bit unless you're using WMP on Windows 7 (new codecs were finally added in Windows 7). Here's a list of codecs supported in XP (Vista is roughly the same). Also, there are some limitations on container formats that may further restrict that--WMP on XP and Vista really only feasibly supports avi and asf containers.

On Windows 7, you also get access to H264, and mp4 containers.

Assuming you're using Windows 7, your best option is definitely h264. You can use x264, which is hands-down the best encoder implementation currently available (it will easily handle the type of video you specified), mux it into an MP4 container, and then you have files that are broadly compatible across all major operating systems (Windows/*nix/OSX).

If you're not using Windows 7, then I'd say your best option is MPEG-4 in an AVI container.

kidjan
would something like ffmpeg work? or do I need something else as well to wrap mpeg video stream into avi? Thank you for your answer.
m1tk4
Yes, ffmpeg would let you encode with h264 and write the files into an AVI container, I believe. I'd use MP4 though; AVI is certainly a venerable format but at this point I think there's better support for MP4. Another option is to use x264 and mp4v2 directly to do the encoding; it's a bit lower-level than using ffmpeg, but it's probably also smaller and maybe easier to digest as a whole. hard to say, you can't go too wrong either way.
kidjan