[Ffmpeg-devel] Re: [PATCH] mpegvideo remove fourcc upper case conversion

Michael Niedermayer michaelni
Wed Aug 23 01:37:01 CEST 2006


On Tue, Aug 22, 2006 at 11:13:43PM +0200, Baptiste Coudurier wrote:
> >> Why not matching both
> >> cases 
> > 
> > messy
> > 
> replacing == with ff_match_codec_tag would not be that messy.
> >> or use sub_id 
> > 
> > sub_id isnt a uppercased codec_tag, and theres stream_codec_tag too ...
> > 
> declaring a sub_id for old divx/whatever mpeg4 flavour is cleaner IMHO,
> and avi demuxer could set it.

no this has nothing to do with the demuxer, divx in mov, nut, mkv, raw
mpeg4-es or in mpeg-ps will all need the very same code it belongs to the
codec, and its not just divx, there are 10 different ones furthermore
lavc MUST be independant from lavf, not everyone uses lavc with lavf

> > so simply ignoring the width/height in mov completely if the codec can set its
> > own width/height is the simplest fix, alternatively you could set the
> > width/height from mov in AVCodecContext.pan_scan and then change
> > av_find_stream_info() so it puts the width/height from AVCodecContext.pan_scan
> > in AVCodecContext if the codec fails with a width=height=0
> > 
> > [...]
> What is the desired behaviour ? Respect quicktime behaviour ? Which is
> the reference player for mov files. 

somethig QT/apple related of course

> Also, when stream copy from mov to
> mov it is better to keep same width and height. So I don't really agree
> to not set them.

AVCodecContext.width/height are the _CODEC_ width/height not the user
croped width/height, if the demuxer doesnt have reliable values it
MUST NOT set AVCodecContext.width/height, it can set something else
to "transport" them to the muxer for stream copy but NOT the codec
width/height its like storing width/height in the audio samplerate and
number of audio channels

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is

More information about the ffmpeg-devel mailing list