[mythtv-users] transcoding perfect dvd rips to xvid
matthew.garman at gmail.com
matthew.garman at gmail.com
Wed Feb 21 21:46:12 UTC 2007
On Wed, Feb 21, 2007 at 11:59:13AM -0800, Blammo wrote:
> Mind sharing your convert script? I've been thinking about doing
> the same thing, since my /video folder is getting full.. and I
> don't want to lose the AC-3 format in the conversion.
I came in late on this thread, but here's my "work in progress"
encoding script. The intent is for encoding material from a DVD
source.
The end result with this script are Matroska video (mkv) files with
H.264 video and Ogg Vorbis audio.
You'll also have a AVIs with the same video, but AC3 audio. (The
AVIs will play with mplayer, although I think they're technically
"broken" AVIs.)
Some caveats:
- I had to upgrade to mkvtoolnix 2.0.0 before I could import
these "broken" AVIs directly into an mkv file. (Before, I had
to use avi2raw to extract the raw h264 video. mkvmerge also
couldn't take raw h264, so I had to use MP4Box to put it in an
MP4 container. And after all that was said and done, I had
terrible A/V sync problems.)
- This assumes that your source material is progressive. You'll
have to add the pullup,softskip filters to mencoder's -vf
chain to de-interlace. I haven't yet verified if this works
without causing A/V sync problems.
Good luck!
for i in 1 2 3 4 ; do
fnbase="dvdrip_${i}" ;
src="-dvd-device /dev/dvd dvd://${i}"
time nice -n 20 mencoder -aid 128 -alang en -oac copy \
-ovc x264 -x264encopts \
bitrate=2000:partitions=all:8x8dct:me=umh:subq=6:frameref=5:threads=auto:pass=1:turbo=1:bframes=4:b_pyramid:weight_b \
-ofps 24000/1001 -of avi -vf hqdn3d=2:1:2,pp=ac,harddup -idx \
-o /dev/null \
${src} >> mencoder.log 2>>mencoder_stderr.log ;
time nice -n 20 mencoder -aid 128 -alang en -oac copy \
-ovc x264 -x264encopts bitrate=2000:partitions=all:8x8dct:me=umh:subq=6:frameref=5:threads=auto:pass=2:bframes=4:b_pyramid:weight_b \
-ofps 24000/1001 -of avi -vf hqdn3d=2:1:2,pp=ac,harddup -idx \
-o ${fnbase}.avi \
${src} >> mencoder.log 2>>mencoder_stderr.log ;
time nice -n 20 mplayer ${src} -ao pcm:fast:file=${fnbase}.wav \
-vc dummy -aid 128 -alang en -vo null ;
time nice -n 20 oggenc -q7 ${fnbase}.wav ;
time nice -n 20 vorbisgain ${fnbase}.ogg ;
time nice -n 20 mkvmerge -o ${fnbase}.mkv -A ${fnbase}.avi ${fnbase}.ogg ;
done
More information about the mythtv-users
mailing list