[MPlayer-users] Size of MP4 video not correctly recognized.

Richard S. teetrinker at gmx.net
Tue Aug 29 14:11:06 CEST 2006


Hernan Badino schrieb:
> >The metadata(moov box/atom) of your mp4 file is wrong. The width and
> >height is set to 320x240.
> >http://img218.imageshack.us/my.php?image=wrongwidthandheight1xb2.png
> >http://img151.imageshack.us/my.php?image=wrongwidthandheight2xx1.png
> >Remux your file with MP4Box( http://gpac.sf.net )
> >MP4Box -add oldfile.mp4 newfile.mp4
> >Richard
>
> Hallo Richard,
>
> Thanks for the help.
>
> Yes, it seems that width and height are wrong. What I don't understand
> is way could I play the file correctly with some previous version of
> mplayer. Currently I can also play the file correctly with mediaplayer
> in windows and the 3ivx codec. And even quicktime can play the file.
> So, how do they do it? They just "guess" the right size?
>
> Hernan
This player(Quicktime)/dshow filter(3ivX) seems to ignore the wrong
information from the container and use the information from the video
elementary stream.
This way they can handle files with wrong information in moov ... .

In ISO/IEC 14496-12(ISO Base Media Format) you will find this for:

http://img218.imageshack.us/my.php?image=wrongwidthandheight1xb2.png

width and height specify the track's visual presentation size as
fixed-point 16.16 values. These
need not be the same as the pixel dimensions of the images, which is
documented in the sample
description(s); all images in the sequence are scaled to this size,
before any overall transformation of
the track represented by the matrix. The pixel dimensions of the images
are the default values.


http://img151.imageshack.us/my.php?image=wrongwidthandheight2xx1.png

width and height are the maximum visual width and height of the stream
described by this sample
description, in pixels.

In ISO/IEC 14496-14( MP4 File Format)you will find this:
In MPEG-4 both visual and aural composition are done using the BIFS
system. Therefore structures marked as “template” in the ISO Base Media
Format which pertain to composition, including fields such as matrices,
layers, graphics modes (and their opcolors), volumes, and balance
values, from the MovieHeaderBox and TrackHeaderBox, are all set to their
default values in the file format. These fields do not define visual or
audio composition in MPEG-4; in MPEG-4, the BIFS system defines the
composition.
The fields width and height in the VisualSampleEntry and in the Track
Header Box shall be set to the pixel dimensions of the visual stream.

Richard



More information about the MPlayer-users mailing list