-
Notifications
You must be signed in to change notification settings - Fork 5
dvd_copy
The dvd_copy program will copy a track or track and specific chapters from a DVD to a filename, or to stdout.
By default dvd_copy will copy the longest valid track, which can be overridden with the --track argument.
See also man dvd_copy
Options: -t, --track <number> Copy selected track (default: longest) -c, --chapter <#>[-#] Copy chapter number or range (default: all) -o, --output <filename> Save to filename (default: dvd_track_##.mpg) --output - Write to stdout DVD path can be a device name, a single file, or directory
The DVD source can be an optical disc in a drive, a device name, an image of the disc (ISO), or a directory. With no argument, it will use the default device of your operating system.
dvd_copy dvd_copy /dev/sr0 dvd_copy dvd_video.iso dvd_copy ~/Videos/DVD/
You can specify the DVD track to copy using -t # argument.
By default, the longest track is copied.
If you want to back up the entire DVD with all its tracks, see dvd_backup.
The format of the track copied is the same on the disc, namely, an MPEG2 transport stream container with MPEG2 video. These are commonly referred to as VOB files.
dvd_copy -o dvd_video.mpg
You can use a program like ffprobe or MediaInfo to display more details about the copy.
ffprobe:
Input #0, mpeg, from 'dvd_track_01.mpg:': Duration: N/A, start: 0.280633, bitrate: N/A Stream #0:0[0x1bf]: Data: dvd_nav_packet Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR 8:9 DAR 4:3], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
mediainfo:
General Complete name : dvd_track_01.mpg Format : MPEG-PS File size : 21.0 MiB Duration : 33 s 634 ms Overall bit rate mode : Variable Overall bit rate : 5 238 kb/s Video ID : 224 (0xE0) Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings, BVOP : Yes Format settings, Matrix : Custom Format settings, GOP : Variable Format settings, picture structure : Frame ...
dvd_copy will copy the content of the track including its video and all the audio streams within it.
dvd_copy by default will copy all the chapters on a track. You can specify chapters using -c #-# arguments.
An example, copy only the second through fifth chapters:
dvd_copy -c 2-5
While the VobSub subtitles are part of the DVD stream, most players won't see them (none that I know of).
Closed caption (cc) subtitles are present in the MPEG2 program stream, and as such is included in the file copied. They should be visible in a media player.
By default, dvd_copy will save the file to dvd_track_<track_number>.mpg. The filename can be overriden using the -o argument:
dvd_copy -o my_dvd.mpg
You an use dvd_copy to pipe the output directly to stdout. This is useful if, for example, you want to remux the data directly, or send it to another application, like ffmpeg.
Simply pass the output filename as -
One example of using a pipe would to be send it directly to ffmpeg to remux it to another format:
dvd_copy -o - | ffmpeg -i - -codec copy dvd_video.mkv
Or even re-encode it:
dvd_copy -o - | ffmpeg -i - dvd_video.mp4
The DVD source can be an optical disc in a drive, a device name, an image of the disc (ISO), or a directory. With no argument, it use the operating system's default DVD device.
dvd_copy dvd_copy /dev/sr0 dvd_copy dvd_video.iso dvd_copy ~/Videos/DVD/