[MEncoder-users] DVD >> MKV with mencoder script.
Federico 'Pain' Pistono
fppain at gmail.com
Thu Jun 2 12:51:18 CEST 2005
I'm trying to crate a simple script that will allow me to backup a DVD at an
acceptable quality into a single MKV file with ogg audio.
I do not wish to use mp3, since it has a low quality and it requires high
bitrate.
I know that the vorbis is not yet supported since it's not stable, but I saw
lots of good results from other rips, hence I wanted to give it a try.
I made the script, but I guess something's not quite right yet, could you
give me some suggestions?
Thanks
Fede
#!/bin/bash
if test "$1" = "" -o "$2" = "" -o "$3" = "" -o "$4" = "" ; then
cat << EOF
`basename $0` (c) 2004 Federico 'Pain' Pistono
Usage: `basename $0` [dvd-device] [dvd title] [bitrate] [outputfile]
- dvd-device = your dvd-device. Either a on-the-fly copy (/dev//dvd)
or a local directory, created before with vobcopy
- dvd title = the title of the dvd using mencoder (e.g mencoder dvd://1,
also multiple titles, like 2-6 = from 2 to 6)
- bitrate = the bitrate to use for the ffmpeg compression (DivX, Xvid)
(best > 900, 1100 is fair enough.)
- output file = name of the output file (e.g. Matrix)
Exmaples files:
[bash]$: fppdvdmkv /dev/dvd 1 1100 Matrix
[bash]$: fppdvdmkv ~/dvd/Matrix/ 1 1100 Matrix
EOF
exit 1
fi
#####################################
# Variable for the encoding quality #
#####################################
opt=vcodec=mpeg4:vbitrate=$3:vqmin=1:lmin=1:v4mv:mbd=2:trell:subcmp=2:cmp=2:precmp=2:mv0:autoaspect:vpass=1:mpeg_quant:psnr:vqcomp=
0.7:vqblur=0.3
#opt="vbitrate=$3:mbd=2:keyint=132:v4mv:vqmin=3:lumi_mask=
0.07:dark_mask=0.2:scplx_mask=0.1:tcplx_mask=0.1:naq"
#opt="vbitrate=$3"
#################################
# Example with a temporary FIFO #
#################################
mknod fifotemp p&&
oggenc -Q -q 3 -o audio.ogg fifotemp&
mplayer dvd://$1 -aid 128 -vc dummy -vo null -hardframedrop -ao
pcm:file=fifotemp&&
rm fifotemp&&
######################
# Faster, but needs space. #
######################
#mplayer -dvd-device $1 dvd://$2 -aid 128 -vc null -vo null -hardframedrop
-ao pcm:file=audio.wav&&
#oggenc -q 3 -o audio.ogg audio.wav&&
mencoder -dvd-device $1 dvd://$2 -aid 128 -ovc lavc -lavcopts
vcodec=mpeg4:vpass=1:$opt -nosound -o /dev/null&&
mencoder -dvd-device $1 dvd://$2 -aid 128 -ovc lavc -lavcopts
vcodec=mpeg4:vpass=2:$opt -nosound -o output.avi
mkvmerge -o $4.mkv output.avi audio.ogg
--
Federico 'Pain' Pistono - Scream for me....
Department of Computer Science - Verona, Italy
My website ::::::::::::::::
www.federicopistono.org<http://www.federicopistono.org>
My personal website :: http://pain.altervista.org
Ex-College Website :::: http://pain.altervista.org/flatnukeuwcad
Linux Registered User #340392
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20050602/f6e75a1a/attachment.htm>
More information about the MEncoder-users
mailing list