Lossless VOB conversion with ffmpeg

16,393

Solution 1

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.

Solution 2

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

Solution 3

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.

Share:
16,393

Related videos on Youtube

tony_sid
Author by

tony_sid

Born and raised in California. Computers are my main hobby.

Updated on September 17, 2022

Comments

  • tony_sid
    tony_sid almost 2 years

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

    • Admin
      Admin over 13 years
      i thought we covered this already with the previous questions relating to -vcodec copy and -sameq
    • Admin
      Admin over 13 years
      On that question I was asking about converting an MKV. I thought that things might be different for VOB files.
  • JamesTheAwesomeDude
    JamesTheAwesomeDude almost 9 years
    Surely, there's a way to losslessly stream copy+concatenate to MKVs?
  • Cry Havok
    Cry Havok almost 9 years
    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.
  • JamesTheAwesomeDude
    JamesTheAwesomeDude almost 9 years
    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) and "concatenate" (an operation that can be performed on certain codecs to concatenate video without re-encoding it). MKV supports every codec, and mpeg2 can be losslessly concatenated.
  • JamesTheAwesomeDude
    JamesTheAwesomeDude almost 9 years
    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).
  • yms
    yms almost 5 years
    Note that this rarely works with VOB files (you get errors about timestamps and whatnot)
  • Marc Torrellas Socastro
    Marc Torrellas Socastro almost 5 years
    Also when converting to mkv, as per comments to answer above by Cry havok?
  • austin
    austin about 4 years
    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)
  • cipricus
    cipricus over 3 years
    this gave me an mp4 video with no audio
  • Marc Torrellas Socastro
    Marc Torrellas Socastro over 3 years
    Yeah, VOBs are problematic in practice, you can try MKV as well as a container.
  • Admin
    Admin almost 2 years
    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.)
  • Admin
    Admin almost 2 years
    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.