How to convert a VOB file to avi?

To get rid of the subtitles I believe you can add the -nosub switch, right after the .VOB file's name.

Example

$ mencoder Videos/Test/VIDEO_TS/VTS_01_1.VOB -nosub -nosound -ovc x264 \
-x264encopts direct=auto:pass=2:bitrate=900:frameref=5:bframes=1:\
me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \
-vf scale=-1:-10,harddup -o video.avi

Details

These incantations are often very dense so to break this one down a bit

  • input file: Videos/Test/VIDEO_TS/VTS_01_1.VOB
  • output file: -o video.avi
  • no subtitles: -nosub
  • don't encode sound: -nosound
  • encode with given codec: -ovc x264

list of other codecs

$ mencoder -ovc help
MEncoder SVN-r36171-4.8.1 (C) 2000-2013 MPlayer Team

Available codecs:
   copy     - frame copy, without re-encoding. Doesn't work with filters.
   frameno  - special audio-only file for 3-pass encoding, see DOCS.
   raw      - uncompressed video. Use fourcc option to set format explicitly.
   nuv      - nuppel video
   lavc     - libavcodec codecs - best quality!
   libdv    - DV encoding with libdv v0.9.5
   xvid     - XviD encoding
   x264     - H.264 encoding
  • x264 encode options: x264encopts
  • set mode for direct motion vectors: direct=auto
  • number of passes: pass=2
  • target encoding bitrate: bitrate=900
  • pre. frames used as predictors in B- and P-frames (def: 3): frameref=5
  • concurrent # of B-frames: bframes=1
  • fullpixel motion estimation alg.: me=umh

    NOTE: umh - uneven multi-hexagon search (slow)

  • enable all macroblock types: partitions=all

  • rate-distortion optimal quantization: trellis=1

    NOTE: 2 - enabled during all mode decisions (slow, requires subq>=6)

  • quantizer increment/decerement value: qp_step=4

    NOTE: maximum value by which the quantizer may be incremented/decremented between frames (default: 4)

  • quantizer compression (default: 0.6): qcomp=0.7

  • motion prediction for macroblocks in B-frames: direct_pred=auto
  • maximum interval between keyframes in frames: keyint=300

  • options after this are video filters: -vf

NOTE: For the video filter switches, it's important that you use harddup as the last filter: it will force MEncoder to write every frame (even duplicate ones) in the output. Also, it is necessary to use scale=$WIDTH,-10 with $WIDTH as -1 to keep the original width or a new, usually smaller, width: it is necessary since the H.264 codec uses square pixels and DVDs instead use rectangular pixels.

  • scale=-1
  • -10
  • harddup

If you intend to use mplayer, then you should try mencoder (http://www.mplayerhq.hu). One of its best features is that the playback options you know from mplayer behave pretty much the same way when encoding. Also, there's a lot of documentation and email threads covering exactly what you're asking:

  • https://wiki.archlinux.org/index.php/MEncoder
  • http://www.linuxquestions.org/questions/linux-newbie-8/how-to-convert-the-vobs-of-video_ts-to-a-single-avi-902280/

I know this is old posting but searching this issue on the internet the above question pops up, and some other entries are even older.

I have tried different tools but in the end I am most satisfied with this command:

ffmpeg -i *.vob -c:v libx264 -crf 20 -c:a libmp3lame -ac 2 -ab 192k output.avi

It is a slight modification of the one that I found here.

I have just replaced audio codec (libflac was absent on my system, so I replaced it with libmp3lame (source) and the -crf value to increase quality. Other formats can also be used, like mp4.

In my test (with a rather mediocre processor) a 2.6 GB vob file (already concatenated out of three other files) was converted to a 960 MB avi video of comparable quality in about 50 minutes.

20 is the medium acceptable quality (in Handbrake help articles I have seen). Larger numbers reduce the size at expense of quality. Above 20 quality loss is clear.

It is better to use that command in a terminal in order to see the progress, kill it more easily, etc.

What I like about this command is that it provides a good balance between quality, time and size and that it can be easily used from the context menu of the file manager.

How to do that depends on the file manager. The command can be easily added to Thunar and Nautilus as a 'custom action'. I have added it to Dolphin with a ~/.kde/share/kde4/services/ServiceMenus/convert_vob_to_avi.desktop file like this:

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin,video/mpeg
MimeType=video/mpeg
Actions=Convert2avi
X-KDE-Submenu=Convert vob (DVD video)
Encoding=UTF8

[Desktop Action Convert2avi]
Name=to avi
Icon=video
Exec=konsole -e ffmpeg -i *.vob -c:v libx264 -crf 20 -c:a libmp3lame -ac 2 -ab 192k output.avi

enter image description here