[MPlayer-users] Conversion from avi to mpeg2 summary
Guillaume POIRIER
poirierg at gmail.com
Mon Jun 27 17:23:31 CEST 2005
Hej,
On 6/27/05, Giacomo Comes <comes at naic.edu> wrote:
> On Mon, Jun 27, 2005 at 03:09:12PM +0200, Nico Sabbi wrote:
> > Guillaume POIRIER wrote:
[...]
> > format=xsvcd.
> > In order to make the gop structure svcd compliant the keyint should be
> > 15 for pal and 18 for ntsc, although very often much longer gops play
> > correctly
> > (I always used 25 without problems).
> > Please, mention also that the resulting file
> > - is an extended svcd (that's why it's called xsvcd), mainly because it
> > doesn't
> > contain scan offsets
> > - it should be passed to vcdimager to generate the svcd image
> >
>
> There should be a mention that PAL requires -ofps 25 and NTSC -ofps 30000/1001.
Fixed
> It it also necessary very often -vf harddup.
Is it safe to add it all the time?
> There is no mention about the fact that the audio should be mp2:
> -oac toolame -toolameopts br=224
> or
> -oac lavc -lavcopts acodec=mp2:abitrate=224
Fixed already :-)
> Question. Is -af lavcresample=44100 necessary? My experience shows that just -srate 44100
> is enough (althouth I always use it with -af-adv force=1).
I don't know, I've never tested it. What's the advantage of your
command line (with -af-adv force =1 on)? Better quality?
Here is the updated FAQ entry (I'm starting to wonder if this should
still be in the FAQ or would rather go into the encoding guide):
<qandaentry>
<question><para>
How can I create SVCDs?
</para></question>
<answer><para>
Newer version of MEncoder can directly generate MPEG-2 files that can be
used as a base to create a SVCD and are likely to be played out of the
box on all platforms (for example to share a video from a digital
camcorder with your computer illiterate friends).
<screen>
mencoder -of mpeg -ovc toolame -toolameopts br=224 -lavcopts \
vcodec=mpeg2video:mbd=2:keyint=25:vrc_buf_size=917:vrc_minrate=600:vbitrate=2500:vrc_maxrate=2500
\
-oac lavc -af lavcresample=44100 -srate 44100 -mpegopts format=xsvcd \
-vf harddup -ofps 25 \
<replaceable>in.avi</replaceable> -o <replaceable>xsvcd.mpg</replaceable>
</screen>
This will convert the input file <replaceable>in.avi</replaceable> into
the output file <replaceable>xsvcd.mpg</replaceable>, converting the
audio with <systemitem class="library">toolame</systemitem> at 224kbps
and the video with <systemitem class="library">libavcodec</systemitem>.
</para><para>
Please note that in order to make the GOP structure SVCD compliant the
<option>keyint</option> option should be 15 for PAL and 18 for NTSC,
although very often files with much longer GOPs play correctly (25 should
never lead to any problem).
Also, even though leaving out <option>-ofps</option> should work in most
cases PAL requires <option>-ofps</option> 25 and NTSC
<option>-ofps</option> 30000/1001.
</para><para>
As far as the audio is concerned, svcd only support MPEG-1 layer II audio,
therefore you have to use either
<systemitem class="library">toolame</systemitem>,
<systemitem class="library">twolame</systemitem>, or as a last resort
<systemitem class="library">libavcodec</systemitem>'s MPEG-1 layer II
encoder (as its quality is far from being as good as the former two
libraries).
Both <systemitem class="library">toolame</systemitem> and
<systemitem class="library">twolame</systemitem> follow the same syntax,
so you depending on which one you managed to install, the example only
requires a small chance, but if you need to use
<systemitem class="library">libavcodec</systemitem>'s MPEG-1 layer II
encoder, replace
<screen>
-oac toolame -toolameopts br=224
</screen>
by
<screen>
-oac lavc -lavcopts acodec=mp2:abitrate=224
</screen>
</para><para>
The resulting file <replaceable>xsvcd.mpg</replaceable> is an extended SVCD
(that's why it's called xsvcd), mainly because it doesn't contain scan
offsets, so if you need to generate a SVCD image out of it, you should
pass it to
<ulink url="http://www.gnu.org/software/vcdimager/vcdimager.html">vcdimager</ulink>.
</para></answer>
</qandaentry>
Guillaume
More information about the MPlayer-users
mailing list