[FFmpeg-user] auto aspect in ffmpeg encoding ?

tte at cs.fau.de tte at cs.fau.de
Mon Jul 4 16:43:18 CEST 2011


I am trying to convert MPEG2 program stream files with ffmpeg. These
often chance pixel aspect ratio (PAR) mid-stream between 4:3 and 16:9
(for example on change of programming or ads). With mpeg2 program streams
all players (ffplay, mplayer, vlc) can automatically handle this just fine,
eg: they automatically rescale according to current PAR.

The problem is that i can not get ffmpeg to encode such files into mpeg4
or h264 and maintain autoamtically the right aspect ratio. Instead, it
always seems to use the aspect ratio with which the mpeg2 file starts up.
I have tried with mpeg4 and avi containers.  I hae tried 0.7.1 and
latest builds of ffmpeg, and all three players (ffplay, mplayer, vlc).
Anybody knows how to get this to work ?

Thanks
    Toerless


More information about the ffmpeg-user mailing list