DVD ripping with Linux.

There are only few really useful commands with minimum description.
Here we go:
Imagine we have dvd already copied to the /DVD subdirectory.
1. First of all, we need to run mplayer to find information about tracks.
mplayer -v -dvd-device /DVD dvd://

Detect cropping
mplayer -dvd-device /DVD dvd://1 -vf cropdetect=24
24 — optional limit value. 24 — is default value. could be from 0 to 255.

Encode first title with cropping, and mp3 96k audio
mencoder -dvd-device /DVD dvd://1 -vf crop=704:576:6:0 -oac mp3lame -lameopts cbr:br=96 -ovc xvid -xvidencopts bitrate=800 -o 1.avi
also useful could be deinterlace post-process filter like -vf pp=lb

Encode first title with AC3 audio copy from audio track ID 128
mencoder -dvd-device /DVD dvd://1 -oac copy -aid 128 -ovc xvid -xvidencopts bitrate=1000 -o 1.avi

Copy ac3 audio only from audio track id 131
mencoder -dvd-device /DVD dvd://1 -ovc frameno -oac copy -aid 131 -o 1.ac3

Ripping subtitles from title 1
tccat -i /DVD -T 1 -L | tcextract -x ps1 -t vob -a 0x22 > subs-en
Note, that subtitle's track id must be specified as 0x20+ track id.
other options here means:
-T n — track number n
-L — loop all chapters
-x ps1 — use codec "ps1" (MPEG private stream, subtitles )
-t vob — source format. "vob" for DVD.

Put ripped stuff all together to the Matroska file

mkvmerge -o out.mkv --language 1:eng --1.avi -D --language 1:rus ru.ac3 --language 0:eng subs-en.idx
Sometimes you will need to specify correct aspect ratio with following option:
--aspect-ratio 0:2.43 where 2.43 is actual aspect ratio

Creating WMV file:
mencoder File.avi -o File.wmv -ovc lavc -oac lavc -lavcopts acodec=wmav2:abitrate=192:vcodec=wmv2:vbitrate=3000

Not everybody know, that avi format supports two audio tracks. The second track can be added by command:
mencoder -oac copy -ovc copy -o output_movie.avi -audiofile input_audio.mp2 input_video.avi

Comments

bonjour!

With rapagg! Merry Christmas! )))

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.