[MPlayer-users] help wanted: using mencoder to make NTSC DVD from transport stream

Nico Sabbi nsabbi at tiscali.it
Sun Mar 6 09:32:01 CET 2005


Aaron Peterson wrote:

>>  mencoder $i -vf scale=720:-2,expand=720:480 -o dvd.mpg \
>>              -vc ffmpeg12,mpeg12, \
>>              -of mpeg -mpegopts format=dvd \
>>              -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=4000:keyint=18:mbd=2:aspect=16/9 -oac copy
>>    
>>
>
>Also, if your example were for video with 4/3 aspect, how would you
>change -vf scale=720:-2,expand=720:480 and still be dvd compliant?  My
>guess is -vf scale=720:-2,expand=640:480, but that is an uneducated
>guess and I would prefer educated instruction :-)
>  
>

-vf scale=x:-2 scales y so as to keep proportions, so whether the 
original A/R is 4/3, 16/9 or 2.35
you will have a properly scaled picture in every case.
The only downside is that  -2 doesn't round to the closest x16 value, so 
you had better do it yourself.

(mplayer -vf scale=720:-2 will tell you what's the value of y, then you 
have to round it to y' and use y'
in the final scale).

Anyway the method I described above produces square pixels, so adding 
:aspect=16:9 is wrong, sorry :)

To keep the original A/R in the encoded movie consider that a 16/9 DVD 
is encoded at 720x480
and displayed with x' = 16/9 * 480 =>  x' =854:480, so to keep 
proportions you want

-vf scale=854:-2,  now calculate y' as I wrote above and run

$ mencoder $i -vf scale=720:y',expand=720:480 -o dvd.mpg -vc ffmpeg12,mpeg12, -of mpeg -mpegopts format=dvd \

-ovc lavc -lavcopts 
vcodec=mpeg2video:vbitrate=4000:keyint=18:mbd=2:aspect=16/9 -oac copy


during playback the movie will be rescaled from 720 x 480 to 854 x 480 
with the proper proportions.

Same procedure to keep *any* original A/R, but changing :aspect accordingly.

If you want to encode to a different A/R (e.g. 16/9 to 4/3 destination) 
the procedure is similar:
720:480 @ 4/3 plays at 640:480, so find y with
-vf scale=640:-2
round y to y' (closest x16), then run mencoder with
-vf scale=720:y',expand=720:480 .... :aspect=4/3



    Nico




More information about the MPlayer-users mailing list