VOB conversion quality in FFmpeg

16

13

I am trying to convert a VOB file to mpeg like this:

./ffmpeg.exe -i VTS_01_2.VOB -r 24  out1.mpeg

However, the quality is very poor.

I tried ./ffmpeg.exe -i VTS_01_2.VOB -vcodec copy out1.mpeg

But the file size is too large (90% of original – 300 MB for 4 minute video), and Windows Movie Maker hangs on trying to import it.

How can I get a decent quality MPEG from my VOB?

JP19

Posted 2011-01-14T18:29:49.280

Reputation:

See the advice on this thread : convert decrypted .vobs to .avi with ffmpeg on ubuntu

– harrymc – 2011-01-14T19:42:31.733

Answers

28

ffmpeg -i input.vob -c:v copy -c:a copy output.mpg  

This command does not reduce the size or alter quality. This merely demuxes the VOB and repackages it as an MPEG. You should be left with exact same quality. The size changes minimally due to losing the overhead of the VOB container.

If you want to maintain quality and reduce size you are going to have to convert it with another encoder like x264 or XviD to an MKV or MP4 container, for example:

ffmpeg -i input.vob -c:v libx264 -c:a aac -strict experimental output.mp4

This will give you H.264 video and AAC audio. Set -crf 23 for the video quality, where less means better quality (sane values are from 18–28). The audio quality can be changed with -b:a 192k for fixed bitrate, or if you want to use another encoder such as -c:a libfaac, you can choose VBR with -q:a 100 (100% default quality).

Stanley Williams

Posted 2011-01-14T18:29:49.280

Reputation: 4 324

1what if there are other VOB that is part of the movie. Does ffmpeg know to include those? – Sun – 2015-11-21T14:47:49.243

1you can cat *.VOB > output.vob – dmgl – 2018-02-15T21:22:49.810

For Windows, if you first need to merge multiple VOBs: copy /b "1.vob" + "2.vob" + "3.vob" "temp.vob". See also https://stackoverflow.com/a/29729610

– Basj – 2019-10-22T19:15:02.973

I see, this is good info to know. Still looking for some reasonable way to compress and maintain quality (4 mins at decent quality should be possible in 10-20 MB for sure... maybe even 50MB is fine). – None – 2011-01-16T05:54:27.310

4

I've recently been doing some VOB encoding after ripping a couple of irreplaceable DVDs. Using the ffmpeg version 1.2.4 out of Homebrew on OSX:

ffmpeg -probesize 2G -analyzeduration 2G \
    -i VTS_04.VOB \
    -map 0:0 -map 0:1 -map 0:2 -map 0:9 \
    -metadata:s:a:0 language=eng -metadata:s:a:0 title="English Stereo" \
    -metadata:s:a:1 language=jap -metadata:s:a:1 title="Japanese Stereo" \
    -metadata:s:s:0 language=eng -metadata:s:s:0 title="English"
    -c:v libx264 -filter:v yadif -crf 18 -level 3.1 -tune film \
    -c:a copy \
    -c:s copy \
    OutputMovie.mkv

I had to set -probesize and -analyzeduration since the 5.4GB VOB file had streams starting later in the file which aren't found without these options.

Next the -map parameter allows me to choose which streams to pass to the output - the video stream, the first two audio streams and the 9th stream, which are subtitles. Use ffprobe (with -probesize & -analyzeduration to see the list of streams).

Add some -metadata to the audio and subtitle streams in the output.

Video encoding options after -c:v you can read about elsewhere.

Finally copy as-is the audio and subtitle streams to the output file. The output must be MKV in order to embed the subtitles and all the metadata correctly.

On my Macbook Air 2011, this encode took about 6 hours and spat out a perfect 2.4GB MKV file.

mafrosis

Posted 2011-01-14T18:29:49.280

Reputation: 161

-1

The syntax in the previous answer doesn't work on my Mac OS. This one seemed to work fine, with slightly different options (-sameq to match the input quantizer, -ss for the start time offset and -t for the duration):

ffmpeg -i VTS_01_1.VOB -sameq -strict experimental -ss 1612 -t 28 test.mpg

Jeff

Posted 2011-01-14T18:29:49.280

Reputation: 1

3Answers are sorted by vote, not by time. You should edit your answer to make it clear which previous answer you mean. – Isaac Rabinovitch – 2013-02-16T07:52:19.770

1You must be using an old version, since the -sameq option is obsolete. In old versions use -vcodec/-acodec instead of -c:v/-c:a. – mark4o – 2013-02-16T09:32:51.977