[FFmpeg-user] transcode mpeg2 changing aspect ratio mid-stream (WSS/AFD/DAR/whatever)

Tomas M tomas at slax.org
Wed Apr 11 14:23:30 CEST 2012


I am trying to convert MPEG2 program stream files with ffmpeg.
These often change aspect ratio mid-stream between 4:3 and 16:9
(for example on change of programming or ads).

The video stream resolution is fixed, but each frame (probably)
has some information whether the player should display it as
16:9 or downscale to 4:3.

This is sometimes referred as WSS (WideScreen Signalling),
sometimes AFD (Active Format Description), sometimes just
as DAR (Display Aspect Ratio), but I believe it is even
something else.

All players which I tried (ffplay, mplayer, vlc) can automatically
handle this just fine, eg: they automatically rescale according
to current aspect ratio.

The problem is that i can not get ffmpeg to encode such files
and maintain automatically the right aspect ratio for each frame.
Instead, it always seems to use the aspect ratio with which
the mpeg2 file starts up, thus the output video plays
using a constant aspect ratio only, and the image is stretched.

I have tried latest builds of ffmpeg with no luck.

Am I missing anything?
Thank you

Tomas M


More information about the ffmpeg-user mailing list