Page 1 of 1

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

Posted: 18 Jan 2012 03:55
by minipluto
Hi,

I'm a relatively new VLC user and 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. I'd rather not do that every time though...

Is there some option in VLC that I should be using to make it set this info, or could this be a bug?


Thanks!

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

Posted: 19 Jan 2012 12:36
by Jean-Baptiste Kempf
This is a bug. Please file a bugreport with this issue on trac.videolan.org/vlc with those details.

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

Posted: 12 Mar 2012 11:09
by tittbit
besides not setting width and height of avi file vlc also have a kind of bug that sometimes when i play a file in vlc it complains that the file needs to be repaired, while media playec classic plays it well.

also some time in the avi file it plays only video and no sound.

i dont know why it happens but it can be bug.

I want to know from vlc developer that when will be new stable version released with added blu ray support, http interface bug fix and some small other bugs

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

Posted: 12 Nov 2012 08:24
by andylee
I just run into this bug too - as of windows version 2.0.4, 10 months later, it still hasn't been fixed!

I just found the ticket - http://trac.videolan.org/vlc/ticket/5886

1500 open bugs??? Where is everyone? This has to be one of the simplest bugs to fix.

All VLC has to do is put W and H at offset 0xB0 and 0xB4 in this example header,
which I did manually for 720x480 (0xD002 x 0x01E0):
...

Code: Select all

A0: 00 00 00 00 73 74 72 66 - 28 00 00 00 28 00 00 00 ....strf(...(... B0:(D0 02 00 00)(E0 01 00 00)- 01 00 18 00 4D 4A 50 47 ............MJPG C0: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................ D0: 00 00 00 00 4A 55 4E 4B - 18 27 00 00 00 00 00 00 ....JUNK.'......
...

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

Posted: 12 Nov 2012 12:01
by Jean-Baptiste Kempf
1500 open bugs??? Where is everyone? This has to be one of the simplest bugs to fix.
We are waiting for your contribution...