Rip a DVD with FFmpeg

I have a DVD video camcorder and so I often need to rip DVD's and convert them to other formats. I prefer the free tool, ffmpeg, for the job. This process only works for unencrypted DVDs like those shot in your own camcorder. If you need to rip a commercial or otherwise encrypted DVD you might want to try Handbrake.

AC3 Support Under Ubuntu

My video camera uses AC3 audio. To use ffmpeg with these files, I need the version that supports AC3, which is not the default under Ubuntu since it changes one of the licenses from LGPL to GPL.

To fix the problem, I just grab the latest snapshot and compile FFMPEG from source.

Under Ubuntu, first make sure that ffmpeg is NOT installed. Then, make sure that gcc, build-essential, and liba52-x.x.x-dev are installed (where x.x.x is the version number). Finally, build ffmpeg with:

./configure --enable-liba52 --enable-gpl
make install

Pull Chapters from VOB

You can pull chapters from VOB files using mplayer. Here's a command line to pull chapter 3 from the DVD drive and dump it to a VOB.

mplayer dvd:// -chapter 3-3 -dumpstream -dumpfile 3.vob

Rip VOB to DV

The following command will rip a VOB file strait from an unencrypted DVD and convert it to a strait DV file.

ffmpeg -i /cdrom/VIDEO_TS/VTS_01_1.VOB -target dv /home/joel/Videos/game_vi.dv

Rip VOB to DVD

The following command will rip a VOB file to an MPEG2 video with AC3 audio for a DVD. It also uses the '-sameq' option which uses the same quality factor in the encoder as in the decoder, allowing almost lossless encoding.

ffmpeg -i myfile.vob -target dvd -sameq myfile.mpg

Rip VOB to VCD

The following command will rip a VOB file to a MPEG1 video with MP1 audio.

ffmpeg -i myfile.vob -target vcd myfile.mpg

Rip VOB to Flash (FLV)

The following command will rip a VOB file to 352×240 (the same size as VCD) and will save it as a flash file.

ffmpeg -i myfile.vob -s 352x240 myfile.flv

Question: Can you make an swf?

Identify a File

You can use ffmpeg to identify the type of video and audio in a particular file. Try the following command.

ffmpeg -i <video file>

This outputs some general program details, an error, and then some information about the input file. An example is below.

Input #0, mpeg, from 'VTS_01_1.VOB':
  Duration: 00:14:48.3, start: 0.220133, bitrate: 9323 kb/s
  Stream #0.0[0x20]: Subtitle: dvdsub
  Stream #0.1[0x80]: Audio: 0x0000, 48000 Hz, stereo, 256 kb/s
  Stream #0.2[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 9100 kb/s, 29.97 fps(r)

More Information

I have more information about video formats and codecs, ripping home video from a DVD, a story board sketching, and more on my Digital Video page.

comments powered by Disqus
video/rip_a_dvd.txt · Last modified: 2011/10/09 13:49 by Joel Dare