13

Is there a way to convert a VOB to another video format using ffmpeg without sacrificing audio or video quality?

tony_sid
  • 14,001
  • 51
  • 139
  • 194

3 Answers3

18

If you mean you want to change a container, that is a VOB to MP4 or MKV without changing hte codec (MPEG2 to H.264, let's say), then yes, it can be done losslessly as follows:

ffmpeg -i your_VOB_file.VOB -c:v copy -c:a copy output.mp4
sup
  • 769
  • 1
  • 9
  • 18
  • 5
    Note that this rarely works with VOB files (you get errors about timestamps and whatnot) – yms Sep 17 '19 at 15:02
  • Also when converting to mkv, as per comments to answer above by Cry havok? – sup Sep 19 '19 at 19:21
  • 3
    love this thank you, looks so good @yms i got timestamp errors for MKV but clean transition for MP4 (it was an mpeg video to start, when checked with `ffprobe`) – austin Mar 31 '20 at 18:53
  • this gave me an mp4 video with no audio – cipricus Nov 30 '20 at 11:40
  • Yeah, VOBs are problematic in practice, you can try MKV as well as a container. – sup Dec 01 '20 at 12:14
5

MKVToolNix can easily make an MKV out of a VOB. Of course this isn't using ffmpeg (directly? - this kind of stuff is a mystery to me), but it may help you accomplish what you're trying to do.

Will Matheson
  • 221
  • 3
  • 7
  • 1
    Using the `ffmpeg -c:v copy -c:a copy` approach also didn’t work for me due to the “Can’t write packet with unknown timestamp” error, but `mkvmerge -o out.mpv *.VOB` from MKVToolNix worked, thanks! I also confirmed with `ffmpeg` that the streams are indeed the same format. (Also the command finished so quickly, it can hardly have done a transcode.) – Ruud Jun 27 '22 at 17:43
  • Correction, that command repeated the video a few times, `mkvmerge` takes only the file name of the first VOB file as input, and it automatically appends the ones with the next sequence number. – Ruud Jun 27 '22 at 18:08
-4

Any time you do any form of format conversion you're likely to end up with some actual quality loss, though if done sensibly you won't be able to detect the quality loss. I do this all the time with tools like Handbrake.

To make life easier, ffmpeg comes with presets to allow you to easily set the options to minimise the detectable loss of quality. Were you to be encoding to x264 then you could use -vcodec libx264 -vpre lossless_medium for instance.

Your choices will depend on your desired destination format, and what tools you want to use.

Cry Havok
  • 3,516
  • 17
  • 13
  • 1
    Surely, there's a way to losslessly stream copy+concatenate to MKVs? – JamesTheAwesomeDude Aug 12 '15 at 16:16
  • 2
    MKV is a container, as is VOB. Neither are video formats. If you want to simply change container, yes. If you want to change codec/format, no. Changing container only works if the devices support the codecs but not the container. – Cry Havok Aug 15 '15 at 10:25
  • Yes, I know that MKV is a container format. I also know that VOB is a container format. I did not imply that either one was a codec. In fact, I used the very words ["stream copy" (lossless copying of a video stream from one compatible container to another)](https://ffmpeg.org/ffmpeg.html#Stream-copy) and ["concatenate" (an operation that can be performed on certain codecs to concatenate video without re-encoding it)](https://trac.ffmpeg.org/wiki/Concatenate#samecodec). MKV supports every codec, and mpeg2 can be losslessly concatenated. – JamesTheAwesomeDude Aug 17 '15 at 19:02
  • 4
    MKV supports all codecs, and mpeg2 can be losslessly concatenated, therefore, it's possible (there may not be any tools currently available to make it _convenient_, but it's **possible**) to rip a DVD to a ~4GB MKV with no re-encoding and therefore no video quality loss. Which I think is what @tony_sid was originally asking for (and what I was trying to find out how to do when I found this question). – JamesTheAwesomeDude Aug 17 '15 at 19:05