[MPlayer-dev-eng] [PATCH] Fix demux_avi >=2GB overflow & enhance avi info output

eviv bulgroz ebulgroz at yahoo.com
Tue Dec 17 17:02:17 CET 2002


Hi,
When playing >=2GB <4GB avi file, the avi info (vlength & kbps) displayed by mplayer overflows and
has wrong and negative values, for example:

mencoder gives the correct result for this large >=2GB output1.avi :
Video stream: 1110.005 kbit/s  (138750 bps)  size: 1866321711 bytes  13450.909 secs  403103 frames
Audio stream:  186.274 kbit/s  (23284 bps)  size: 313204800 bytes  13451.376 secs

And the mplayer -v wrong result for output1.avi :
...
AVI video length=2186190938
VIDEO:  [DIVX]  640x272  24bpp  23.98 fps  -1254.2 kbps (-153.1 kbyte/s)
[V] filefmt:3  fourcc:0x58564944  size:640x272  fps:23.98  ftime:=0.0417


Actually, even when it doesn't overflow, the way the video length and kbps are calculted is wrong,
for example ;

The correct mencoder result for output2.avi :
Video stream:  802.801 kbit/s  (100350 bps)  size: 615965460 bytes  6138.160 secs  153445 frames
Audio stream:  114.546 kbit/s  (14318 bps)  size: 87894672 bytes  6138.624 secs

And the wrong mplayer -v result for output2.avi (video length & kbps don't match):
...
AVI video length=703680746
VIDEO:  [DIVX]  640x272  24bpp  25.00 fps  917.1 kbps (112.0 kbyte/s)
[V] filefmt:3  fourcc:0x58564944  size:640x272  fps:25.00  ftime:=0.0400


The following patch modifies the way the vlength & kbps values are calculated by using the avi
index. It adds the display of audio informations, a/v time length, a/v frames ... It doesn't
however try to display these a/v info that relies on the stream size if the stream is broken and
has no index available or reconstructed. Use -idx if you want them. Here is an example of the
modified output using a broken avi without index.

mplayer -v -idx output3.avi
...
AVI video size=624191830 audio size=107326272
VIDEO: [DIVX] 640x272 24bpp 23.98fps 4628.04s 110962f 1079.0kbps (131.7 kbyte/s)
AUDIO:   [55] 48000Hz 2chan          4628.52s 192855f  185.5kbps ( 22.6 kbyte/s)

mplayer -v output3.avi
...
VIDEO: [DIVX] 640x272 24bpp 23.98fps
AUDIO:   [55] 48000Hz 2chan

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demux_avi_fix_bps_overflow.diff
Type: application/octet-stream
Size: 3742 bytes
Desc: demux_avi_fix_bps_overflow.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20021217/594c1cbc/attachment.obj>


More information about the MPlayer-dev-eng mailing list