Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a .vob file that has bee ripped from a dvd, when I watch the .vob its very good quality video and 5.1 english audio but when I use ffmpeg it has rubbish video and mono french audio.

That was using this command:

ffmpeg -i /samba/ripping/vobs/12161840#2.vob -f avi /samba/ripping/avis/test.avi

I've tried a few different variations on that but it never comes back with anything good just bigger files with bad video and incorrect sound.

I know the videos good and the correct audio streams exist so how do I select a 5.1 track and get good video?

ffmpeg gives the .vob details as:

Input #0, mpeg, from '/samba/ripping/vobs/12161840#2.vob':
   Duration: 00:42:05.56, start: 0.287267, bitrate: 5738 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 8436 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
    Stream #0.2[0x81]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
    Stream #0.3[0x82]: Audio: ac3, 48000 Hz, mono, s16, 192 kb/s
Output #0, avi, to '/samba/ripping/avis/test.avi':
  Metadata:
    ISFT            : Lavf52.64.2
    Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0.1: Audio: mp2, 48000 Hz, mono, s16, 64 kb/s
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.3 -> #0.1
share|improve this question

The default encoding options are low, audio bitrate is 64k for example. You can up these values with extra command line options:

ffmpeg -i sourcefile.vob -ab 128kb -qscale 4 newfile.avi

-ab 128kb sets the average audio bitrate to 128kb, and -qscale 3 sets the video quantizer scale, where q is 1 (best) or 31 (worst) quality.

For comparisson, for a 5 minute video of 700x576 resolution with 128kb audio:

  • q 10 = ~40MB
  • q 4 = ~80MB

Taking this another step, you can batch convert a whole bunch of vob's in a directory with this bash command:

for f in *.vob; do ffmpeg -i "$f" -ab 128kb -qscale 4 "${f%%.vob}.avi"; done;

We enclose $f in quotes in case there are spaces in the file names, and ${f%%.vob} removes the vob extension before we add our own avi extension. (This is parameters substitution in bash, very useful! http://tldp.org/LDP/abs/html/parameter-substitution.html)

There are plenty more options you can read through at: http://www.ffmpeg.org/ffmpeg-doc.html

share|improve this answer
    
+1 Outstanding. – zenbike Aug 1 '11 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .