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

belcampo belcampo at zonnet.nl
Sun Mar 1 19:07:40 CET 2009

Ruud van der Linden / FluxxNet.nl wrote:
> Hi,
> 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 
> content
> 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 
> YV12)9:160]
> 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
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
Maybe not what you are looking for, but a solution, that works, tried it 
on your shorttest.mpg

You can get what you wan't by sort of 'framegrabbing'. Use a player with 
component out, PopCornHour A-100/A-110, connect to a Hauppauge HD-PVR 
select 4:3 as output aspect in the PCH, under linux there's a hdpvr 
driver, 720p and 1080i worl reliable, and you can cat /dev/video0 > 
wantedh264.ts file.

Henk Schoneveld

More information about the MEncoder-users mailing list