[MEncoder-users] What's wrong with this script (encoding x264 in mkv-container)

Robert Ramiega jedi at plukwa.net
Thu Mar 26 07:26:47 CET 2009


On Thu, Mar 26, 2009 at 12:19:01AM +0100, Stjepan Brbot wrote:
> On Sun, 2009-03-22 at 21:10 +0100, Al Bogner wrote:
> > If I replace *.mpg with 1 existing filename, the script works. What do I have 
> > to do to encode a few mpg-files to 1 mkv-file? Any improvement of the options 
                                       ^^^^^^^^^^
> for i in *.mpg; do
> 
>  #1st pass
>  mencoder $i -aspect 16/9 \
>  -vf yadif=0,softskip,harddup -nosound \
>  -ovc x264 -x264encopts bitrate=3500:subq=5:bframes=3:b_pyramid:weight_b:turbo=1:threads=auto:pass=1 \
>  -of rawvideo -o /dev/null
> 
>  #2nd pass
>  mencoder $i -aspect 16/9 \
>  -vf yadif=0,softskip,harddup -nosound \
>  -ovc x264 -x264encopts bitrate=3500:subq=5:8x8dct:frameref=2:bframes=3:b_pyramid:weight_b:threads=auto:pass=2 \
>  -of rawvideo -o tmp.264
> 
>  #audio pass
>  mencoder $i -of rawaudio -oac mp3lame -lameopts preset=standard -ovc copy -o tmp.mp3
> 
>  #MKV muxing
>  mkvmerge -o $i.mkv tmp.264 tmp.mp3

 Wouldn't this create separate mkv for each mpg file?

-- 
 NameLess, the Jedi     | Just a friendly Jedi Knight                                                                                                         
 Robert Ramięga         | http://nlj.plukwa.net/


More information about the MEncoder-users mailing list