Skip to content

MJPEG->AVI doesn't set width/height in AVI header

I've been trying to save the MJPEG stream from a Foscam camera to an AVI file using VLC 1.1.11...

vlc http://foscam/video.cgi?user=x&pwd=y --sout="#standard{access=file,mux=avi,dst=output.avi}"

The resulting file can be played in VLC, but when loaded in VirtualDub, it complains:

"The size of this frame is inconsistent with the video"

It also won't load in Zoom Player, KMPlayer, etc.

When I used VirtualDub's hex editor, I noticed the width and height of the AVI's strf BITMAPINFOHEADER is not set. ie:

BITMAPINFOHEADER.biWidth = 0

BITMAPINFOHEADER.biHeight = 0

If I manually hex-edit it to 640x480, the file loads correctly in all the programs.

Thank you.

http://forum.videolan.org/viewtopic.php?f=2&t=97273

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information