[MEncoder-users] Aspect ratio change during MPEG-TS not detected (bug?)

Ruud van der Linden / FluxxNet.nl ruud at fluxxnet.nl
Mon Feb 23 14:28:51 CET 2009


I'm working on a system that records an MPEG-TS stream (MPEG2) directly 
from DVB-T, and uses mencoder to transcode it directly to MPEG4/H.264.

They seem to totally ignore any change and only use the first aspect 
ratio found in the stream (if the stream starts at 4:3, it will maintain 
that ratio always). Options like dsize,aspect,scale,autoaspect all seem 
to have no effect on the way mencoder handles the mid-stream change. 
However, I'm running into one problem: mencoder or its filters do not 
handle aspect ratio changes correctly (mplayer and vlc do).

I would like to have one of the following results in output-file:
1) an mp4 (h264) file which contains the same aspect ratio change 
instructions as the original mpeg-ts, if that is possible (don't know 
for sure)
2) a permanent 4:3-aspect file (e.g. 768x576) which letterboxes the 16:9 

You can find a sample movie at this location (the beginning is corrupted 
as it is a dd'ed part from the file):

When starting the transcode, it mentions:
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.

Halfway (at the aspect ratio change) it mentions:
VDec: vo config request - 704 x 576 (preferred colorspace: Planar 
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.

But I don't see it actually prescaling at all. By the way, this was 
tested with the current svn version of mencoder as well as with older 
versions, all show the same behaviour.

I hope someone can come up with a fix for this bug. Thanks in advance 
for responding!

With kind regards,
Ruud van der Linden

More information about the MEncoder-users mailing list