User Tools

Site Tools


dvdavi

**This is an old revision of the document!**

DVD to avi with multiple audio tracks and subtitles

  • Get chapter information

    dvdxchap -t 1 /dev/sr0 > chapters.txt

  • Get subtitles

    mencoder dvd:1dev/sr0 -nosound -ovc frameno -o /dev/null -slang en -vobsubout sub.en

  • Convert subtitles to srt: Use avidemux, works fine.
  • Get the crop values:

    mplayer dvd:1dev/sr0 -vf cropdetect -sb 50000000

  • Write the values down. Ex: -vf crop=704:560:12:6
  • Do a small mencoder test to get the correct aspect ratio after cropping:

    mencoder dvd:1dev/sr0 -vf crop=704:560:12:6 -oac copy -ovc raw -endpos 120 -o movie-cropped.mpg mplayer -v movie-cropped.mpg | grep -i aspect

  • Example: 1.79:1
  • Encoding first pass:

    mencoder dvd:1dev/sr0 -vf pullup,softskip,crop=704:560:12:6,harddup -nosound -ovc x264 -x264encopts bitrate=1300:subq=5:bframes=3:b_pyramid=normal:turbo=1:pass=1 -of rawvideo -o movie.264

  • Enconding second pass:

    mencoder dvd:1dev/sr0 -vf pullup,softskip,crop=704:560:12:6,harddup -nosound -ovc x264 -x264encopts bitrate=1100:subq=5:8x8dct:frameref=2:bframes=3:bpyramid=normal:weightb:pass=2 -of rawvideo -o movie.264

  • Extract audio:

    mplayer dvd:1dev/sr0 -aid 129 -dumpaudio -dumpfile audio129.ac3

  • Convert to pcm

    a52dec audio129.ac3 -o wavdolby > audio129.wav

  • Compress to aac

    faac audio129.wav audio129.aac -b 256 -q 100

  • Or:

    mkfifo audiodump.pcm mplayer dvd:1dev/sr0 -aid 129 -ao pcm:fast:nowaveheader -channels 6 & faac -b 256 -q 100 -I 5,6 -P -R 48000 -C 6 -X audiodump.pcm -o audio129.aac

dvdavi.1329625080.txt.gz · Last modified: 2021/02/01 05:55 (external edit)