wsherman <[email protected]> added the comment:
I did some more research and testing. Changing a single DWORD value causes the
AVI to be playable by Windows XP (and still playable on Windows 7), although
flipped.
According to MS docs, if the AVI stream header (chunk 'strh') fccType has a
FOURCC of 'vids', then the stream format chunk ('strf') contains a BITMAPINFO
struct (http://msdn.microsoft.com/en-us/library/aa451198.aspx). This is true of
an uncompressed RGB AVI.
In the 'strf' chuck BITMAPINFO struct we have a LONG biHeight field. MS docs
state "For uncompressed RGB bitmaps, if biHeight is positive, the bitmap is a
bottom-up DIB with the origin at the lower left corner. If biHeight is negative,
the bitmap is a top-down DIB with the origin at the upper left corner."
(http://msdn.microsoft.com/en-us/library/dd318229.aspx)
Evidently, Windows XP wants a positive value here or it thinks the AVI requires
a codec (use of a negative height seems to be fixed in Windows 7). In the
ffmpeg generated output file I used a hex editor to change the value biHeight as
follows:
from: 0xFFFFFFA0 (-96)
to: 0x00000060 (96)
After this change, Windows XP will play the file. The only problem now is the
video is upside down.
So the fix to correctly create uncompressed AVIs involves two changes:
1) Use a positive biHeight value in the BITMAPINFO struct
2) Make sure the bitmaps are a "bottom-up DIB with the origin at the lower
left corner"
----------
status: closed -> new
substatus: duplicate -> new
________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2395>
________________________________________________