[MPlayer-users] Recoding to VCD Using MEncoder Only
Gordan Bobic
mplayer at bobich.net
Mon May 10 18:10:34 CEST 2004
On Monday 10 May 2004 17:03, Nico Sabbi wrote:
> >>>Is there any reason why this cannot be done? I presume that it
> >>>cannot be done, since I have found the mencvcd script in the TOOLS
> >>>directory which seems to use an exceedingly long winded way of
> >>>recoding files into VCD format, using mjpegtools.
> >>>
> >>>I think I have managed to get the mencoder setup almost right to
> >>>achieve the same thing without the clutter of all the other
> >>>seemingly inferior tools and overheads of doing the same job
> >>>several times, but I am stuck in one last tiny detail.
> >>>
> >>>Here is the script I use:
> >>>
> >>>#!/bin/bash
> >>>mencoder -oac lavc \
> >>> -ovc lavc \
> >>> -ofps 25 \
> >>> -of mpeg \
> >>> -lavcopts
> >>>vcodec=mpeg1video:acodec=mp2:vbitrate=1150:abitrate=224:vrc_buf_si
> >>>ze =327:vrc_maxrate=1150
> >>
> >>you missed keyint=12, but generally dvd players tolerate much
> >> longer values;
> >
> >Ah, OK. Is 12 really what the spec for VCD says? That sounds rather
> >small...
>
> yes it's tiny, and if I remember correctly it's the value stated in
> the specs, but following the standard at the letter with modern
> players is quite useless.
> In my opinion you can safely use a larger value.
OK, thanks. I'll up that to around 125, and see if it works on a few DVD
players...
> >>2 passes and mbd=2 are reccomended
> >
> >OK, I'll try it with mbd=2 and see if it looks better...
> >
> >>>\
> >>> -vf scale=352:288,dsize=4/3 \
> >>> -af resample=44100:0:2 \
> >>> $1 -o $2
> >>>
> >>>This seems to work really well, except for one small problem - the
> >>>"-af resample=44100:0:2" part doesn't seem to do what the
> >>>documentation says it should (or maybe I am reading it wrong).
> >>
> >>-srate 44100 usually works well
> >
> >Ah, excellent, thanks, that did the trick. :-)
> >
> >>>I have videos encoded with varying frequencies other than 44100
> >>>(e.g. 22050, 48000), and I have to make this into 44100 to make it
> >>>VCD compliant. However, the files encoded using the above script
> >>>still have the same audio frequency (confirmed using "mplayer
> >>>-identify") as the source file. The video seems to be in the
> >>>correct format, but the audio is not.
> >>>
> >>>What I am I doing wrong? I would really like to avoid using the
> >>>mjpegtools script if at all possible because it takes much longer.
> >
> >One last problem - the "dsize=4/3" (or "dsize=1.333333") parameter
> >doesn't seem to set the aspect ratio in the resulting file. I know
> > that this is being really pedantic, but I have heard that VCD MPEG
> > video should have it. Can anybody confirm or deny this, and if it
> > is required, how do I make it stick on the encoded file?
>
> dsize is useless, instead add to lavcopts ...:aspect=4/3:...
Thanks, that did the trick. It all seems to be working now, and it is
considerably more elegant than the mjpeg tools solution with stripping
out the audio and video separately, transcoding them, and only then
recombining them. :-)
All I have to do now is burn it onto a CD and see if it works on a DVD
player...
Thanks for the help, I really appreciate it.
Gordan
More information about the MPlayer-users
mailing list