[MEncoder-users] Convert to PSP compatible MP4: Rescaling

James Hastings-Trew jimht at shaw.ca
Thu Jul 31 00:21:03 CEST 2008


Shuang Wu wrote:
> hi,
>
> I am using the following command to convert movies to PSP compatible MP4.
>
> mencoder -sws 9 -vf pullup,softskip,scale=480:272,harddup,unsharp=l3×3:0.7 -ofps 30000/1001 -oac lavc \
>     -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=libfaac \
>     -ovc x264 -x264encopts bitrate=500:global_header:partitions=all:trellis=1:level_idc=30:threads=4 \
>     -of lavf -lavfopts format=psp -af volnorm -channels 2 -srate 48000 \
>     /|input.video|/ -o /|output.psp|/
>
> It works, but if I tried to rescale a movie with original aspect ratio, it sometimes fails.
> For example, the original movie is 640*480, to keep the original aspect ratio, the vf is set to
>     scale=-10:272
>
> Unfortunately, the output mp4 file extends to 738*544...
> However, I can see the video stream has the dimension of 368*272...
>
> Is there anything wrong?
>   
Unless I am horribly wrong here (under the influence of cold medicine)
you'll need to actually calculate the scale yourself rather than rely on
the -10:272 trick. Then you'll need to put a dsize command in your
filter chain to set the PAR.

-vf pullup,softskip,scale=xxx:yyy,dsize=xxx:yyy,harddup,unsharp=l3×3:0.7

That should fix that problem for you... but that might be the codiene
talking.



More information about the MEncoder-users mailing list