Extracting and Trimming DVD source video using mplayer
From SDA Knowledge Base
(originally from this post)
this document pertains primarily to unix (mac os x, linux, etc) users, though you can use mplayer under windows, too. in fact, it comes with anri - look under c:\programs\anri_whatever\ for mplayer.exe.
if you're on a mac and don't have mplayer you can download it here:
once you have it in your applications folder then you can invoke it via the command line (terminal) too. normally mplayer is really hard to use from the command line but for what we are doing it won't be bad.
first you need to either insert the dvd or otherwise have the VIDEO_TS folder accessible somewhere on your hard drive.
then the terminal command is like this:
/Applications/MPlayer\ OSX\ Extended.app/Contents/Resources/Binaries/mpextended.mpBinaries/Contents/mpextended.mpBinaries/Contents/MacOS/mplayer \ -dvd-device /path/to/VIDEO_TS \ dvd://1 \ -dumpstream -dumpfile ~/Desktop/myrun.vob \ -ss 100 \ -endpos 60
i end each line with backslash - that's to stop it from executing the command until you end a line without a backslash. it's just to keep the parts of the command separate and easier to look at and talk about.
first line is just the path to mplayer. if you're on a mac and put mplayer os x extended in your applications folder then it should be identical for you, can just copy and paste. otherwise you'll need to adjust it to point to your mplayer binary executable.
second line after -dvd-device is the path to your VIDEO_TS folder. can drag and drop the folder into the terminal so you don't have to actually type the path.
next is the title number. can choose title like dvd://1, dvd://2, dvd://3, dvd://4 etc. if you want to preview what title it is you can hit enter now and it will pop up a window showing that title (hit q to get out). otherwise keep typing.
after -dumpstream -dumpfile is the path to the new file you are making with the part of the run cut out. here i put it on my desktop and call it myrun.vob. then you can just upload that to youtube or whatever when mplayer finishes.
last is the -ss argument which is how far in to start, 100 seconds here. supposedly you can also do like 00:01:40 for 100 seconds (1 minute 40 seconds).
-endpos is how far in to stop after -ss. so in this example we are starting 100 seconds in and ending 60 seconds later (at 160 seconds). -endpos also accepts the pretty 00:01:40 style format.
while running mplayer you may see this:
*** libdvdread: CHECK_VALUE failed in libdvdread4/nav_read.c:264 *** *** for dsi->dsi_gi.zero1 == 0 ***
you can safely ignore it.