[MPlayer-users] Mencoder: Changing frame rate (RealMedia to vcd)

Giacomo Comes comes at naic.edu
Sat Jan 1 16:17:42 CET 2005


On Fri, Dec 31, 2004 at 10:27:09PM -0800, RC wrote:
> On Fri, 31 Dec 2004 10:49:31 -0800
> Bill Moseley <moseley at hank.org> wrote:
> 
> >    mencoder  -ovc lavc -lavcopts vcodec=mpeg1video \
> >              -oac lavc -lavcopts acodec=mp2 \
> >              input.rm
> 
> You'd get better quality doing 2-pass encoding, and adding at least
> "mbd=2" and "trell" to your lavcopts.  Toolame provides much better
> quality than the lavc mp2 codec.
> 
> You're likely unable to seek (backwards) in this file, as the keyframes
> are only once every 250 frames by default, whereas the VCD standard is
> 30.
> 
> >    mplex -f 1 -o vcd.mpg temp.m1v temp.mpa
> 
> tcmplex (part of transcode) seems to produce smaller files, and screws
> up less for me, but only minor differences.
> 
> > I don't see any advantage of using svcd since my source is only
> > 320x240.
> 
> Well, players limit VCDs to stereo 224Kbit audio, whereas with SVCDs you
> can use any bitrate, and mono/stereo/joint-stereo.  Plus, SVCDs use
> MPEG-2, which is obviously better, and at higher (video) bitrates so the
> picture can be much better.  
> 
> >  I assume I'd need to scale from the  Realmedia image size to vcd
> >  images size (320x240 -> 352x240).
> > Something like this?
> > 
> >    -vf scale -zoom -xy 352
> 
> No no.  There's no reason to use -xy or -zoom.  Just -vf scale=352:240
> would work, although it will stretch your video.  A preferable option
> would be "-vf expand=352:240" which will just add black-bars on the
> sides (which you might not even be able to see on a TV screen) so you
> have the right dimentions, and don't have to stretch anything.  Or, you
> can up-scale the video to the right width, while maintaining the right
> height:width aspect ratio, then croping the extra height, like this:
> "-vf scale=352:-2,crop=352:240".  Take your pick.

I disagree with the whole story of expand or crop.
Just -vf scale=352:240 is enough.
The Realmedia video is 320x240 (aspect 4/3), you scale to 352x240 and that's it.
mencoder will add 4/3 aspect ratio to the mpeg stream and the player will
take the 352x240 video and scale it.
The crop/expand stuff would be required if you set 1:1 aspect ratio,
(-lavcopts aspect=1), but that's unnecessary because VCD usually have 4/3 aspect ratio.
Belive me, I have been working A LOT on scaling and aspect ratio with both
mencoder and yuvscaler in encode2mpeg

> 
> > But how do I get the mpeg container instead of the avi which I can use
> > for vcdimager?
> 
> You have several options.  You can just use "-of mpeg" which will give
> you an mpeg instead of an avi, but vcdimager will have to pad it,
> wasting a good 10-20% of your VCD disc space.  That's your easiest
> option if you don't mind the waste.
> 
> If that's not acceptable, you can apply the version of the patch I've
> attached, which allows you to use mplayer with "-dumpvideo" and
> "-dumpaudio" on the file mencoder outputs, to create .m2v and .mp2 files
> from your avi, which you can then use with mplex.

Could you explain me why your patch is required?
I usually use mplayer with "-dumpvideo" and "-dumpaudio" on the file 
mencoder outputs, to create .m2v and .mp2 files and seems to work fine.

Giacomo




More information about the MPlayer-users mailing list