Writing AVI file problems

I am am having trouble getting consistent, and even reasonable, behavior out of a “Compress (DShow9)” and “Writer (DShow9)” chain.

I am processing live video input of dancers, and extracting motion data from the video which is used for generating graphics, but also sent via OSC to a SuperCollider program which is generating interactive music. I am working with a composer on the other side of the world, and I need to be able to send him both a video file of the dancers, and a data file of the derived data.

The most obvious thing to do is write a file of the video being analyzed. So I tossed in a AsVideo -> Compress -> Writer chain, but no joy. And yes, I have a MainLoop to slow things down.

Several problems:

  1. The Compress “Property Page” bang has no effect.

  2. Some codecs don’t work at all - no file is written.

  3. Some codes appear to write only keyframes, so the output is way too fast (Indeo 5.1, Cinepak).

  4. Some codecs write many duplicate frames so the output is way too slow (MJPEG, MS MPEG-4 V2).

  5. Some are pretty close, but time is still noticeably off (Indeo 3.2)

So what have folks been able to get to work correctly? I can’t get anything to work right.

And since this has to be sent over the internet to China, I was hoping to avoid having to save raw files and off-line compress them. The machine I am using is more than sufficient for doing these compressions in real-time.

And WHY can’t we set the frame rate?!?! I realize the actual framerate depends on the loop timing, but having it always set to 25 is a PAIN. If there were an input pin that just wrote whatever value to the AVI header it would be a BIG help, so when you’re working at 30 or 60 fps the header would be closer to correct, and this seems like a trivial addition.

Thanks a bunch!

helo mediadog,

i am afraid to say that the Writer (DShow9) has not been tested with the AsVideo (EX9.Texture). what should kind of work is connecting VideoIn (DShow9) to a writer directly or via Compress (DShow9). the fixed 25fps also come from the AsVideo node and therefore don’t bug in such setups. but that probably doesn’t help you.

if a codec doesn’t pop up a property page, it doesn’t have any. it works for me with the DV codec.

ah and have you tried fraps?