[MEncoder-users] ogm2avi script

Richard Konrad rkonrad at shaw.ca
Sun Jan 16 01:19:52 CET 2005


This is, I believe, the first time I've posted to this group.  I have
a .ogm file which through a script I found at the transcode website,
I've been able to convert it to an .avi.  The problem is there is no
sound.  tcprobe -i confirms this.  This is the script:

#!/bin/sh

 #
 # This script converts dual audio soft-subbed .ogm files
 # to hard-subbed .avi files using the second audio track
 # and the first subtitle track.
 # I recommend using a 24 pixel subtitle font, anything
 # less and folks *will* complain.
 #
 # Note that the bitrate of 3000 is HUGE. I do this
 # because the .avi I create here is just an intermediate
 # product. If you are only after a .avi, you should be
 # using a bitrate of <= 1800 and a two-pass encode!
 #
 # 2-pass encoding is done by adding a vpass=1 option
 # to lavcopts and just copying the audio on the first
 # pass and setting -o /dev/null. Then use the vpass=2
 # option on the command shown here and the dynamic
 # analysis data from pass 1 will be used for the encode.
 # Play with different vbitrate settings to see what the
 # real optimal size/quality point is.
 #
 # Note that changing .ogm to .mkv in this script will
 # make it work on .mkv files. Slight mods will allow
 # it to be used on dvd's.
 #

 files="$@";


 for arg in $files ;


 do


 file=`echo $arg | sed -e 's/\.ogm$//'`


 mencoder -oac mp3lame \
          -ovc lavc \
          -lavcopts vcodec=mpeg4:vqscale=2:vhq:v4mv:trell:vbitrate=3000
\
          -aid 1 \
          -sid 0 \
          -o $file.avi $file.ogm >& /dev/null


 done

 # end of script

Any thoughts?  Is there a problem with the script?  THanks.

Richard






More information about the MEncoder-users mailing list