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 am trying to convert a VOB to an AVI. I have ripped an AVI from this VOB before using ffmpeg, but for some reason it's not working this time. This is what I tried:

ffmpeg -sameq -acodec copy -i VTS_01_2.VOB output.avi

This is the output I get:

FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Dec 29 2010 18:02:10 with gcc 4.2.1 (Apple Inc. build 5664)
  configuration: 
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0
[mpeg2video @ 0x101014200]mpeg_decode_postinit() failure
    Last message repeated 6 times
Input #0, mpeg, from 'VTS_01_2.VOB':
  Duration: 26:30:29.20, start: 140.171311, bitrate: 90 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 32:27 DAR 16:9], 9800 kb/s, 31.44 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0.1[0xa0]: Audio: pcm_s16be, 48000 Hz, 2 channels, s16, 1536 kb/s
Output #0, avi, to 'output.avi':
  Metadata:
    ISFT            : Lavf52.64.2
    Stream #0.0: Video: mpeg4, yuv420p, 720x480 [PAR 32:27 DAR 16:9], q=2-31, 200 kb/s, 29.97 tbn, 29.97 tbc
    Stream #0.1: Audio: pcm_s16be, 48000 Hz, 2 channels, 1536 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Could not write header for output file #0 (incorrect codec parameters ?)
share|improve this question

Or you can use handbrake. It wraps ffmpeg and does the heavy lifting for you. It comes with a CLI version and has built-in presets for the most common output formats.

share|improve this answer
    
for i in {5..7}; do ./HandBrakeCLI -i /dev/cdrom -a 1 -E mp3 -B 96 -t $i -o "Track-$i.mp4"; done – andrej Dec 2 '15 at 23:08
up vote 1 down vote accepted

This is what worked:

ffmpeg -i VTS_01_2.VOB -ss 589 -t 274 -c:v mpeg4 -qscale:v 2 -c:a mp2 -b:a 320k output.avi

Apparently, specifying the audio codec is what did the trick.

sameq should not be used, and it's better to specify the video codec and quality explicitly, too.

share|improve this answer

You must log in to answer this question.

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