[MPlayer-dev-eng] demux_mov & width/height

Arpi arpi at thot.banki.hu
Wed Mar 13 22:11:53 CET 2002


Hi,

> i just added philips .mp4 decoding support to ffmpeg, but i had to hardcode 
> the width&height in demux_mov.c ...
> and the reason why .mp4 files where not playable was simply because half of 
> the header seems to be missing, ffmpeg simply tries to guess the missing par
> t 
> now but imho the demuxer could be fixed perhaps ;), and no, the part of the 
> header which is passed to ffmpeg doesnt contain the width & height info 
> appearently

this is the problem i mentioned when i started the work at libmpcodecs.
unfortunatelly it's very common that width/height values in the quicktime
.mov headers are the display size, not the coded size.
in the quicktime architecture, teh codecs handle scaling so it is not
problem there. if you look at qt files, all of their codecs has internal
header having the real width/height (cinepak, h263, dv etc).
the codec reads the real width/height from compressed frame's header and
rescale decoded image to the width/height in .mov header.
It's very common that qt files has 640x480 in the .mov header (probably it's
a common display resolution on mac) while the coded dimensiopns are 352x288
or 720x576.

i'm also sure, that those .mp4 files has real w/h in the compressed mpeg
stream too, as you can extract mpeg steram from the qt container, and
it's still playable afaik.

the new libmpcodecs core allows codecs to override width/height come from
demuxer, to solve this problem. anywya this feature is not yet finished,
just the api done to support this. i'm working on this right now, but it
needs to remove old dec_video and reorder libvo and codec initialization.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list