Lossless VOB conversion with ffmpeg
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.
Related videos on Youtube
tony_sid
Born and raised in California. Computers are my main hobby.
Updated on September 17, 2022Comments
-
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 over 13 yearsi thought we covered this already with the previous questions relating to -vcodec copy and -sameq
-
Admin over 13 yearsOn that question I was asking about converting an MKV. I thought that things might be different for VOB files.
-
-
JamesTheAwesomeDude almost 9 yearsSurely, there's a way to losslessly stream copy+concatenate to MKVs?
-
Cry Havok almost 9 yearsMKV 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 almost 9 yearsYes, 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 almost 9 yearsMKV 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 almost 5 yearsNote that this rarely works with VOB files (you get errors about timestamps and whatnot)
-
Marc Torrellas Socastro almost 5 yearsAlso when converting to mkv, as per comments to answer above by Cry havok?
-
austin about 4 yearslove 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 over 3 yearsthis gave me an mp4 video with no audio
-
Marc Torrellas Socastro over 3 yearsYeah, VOBs are problematic in practice, you can try MKV as well as a container.
-
Admin almost 2 yearsUsing 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, butmkvmerge -o out.mpv *.VOB
from MKVToolNix worked, thanks! I also confirmed withffmpeg
that the streams are indeed the same format. (Also the command finished so quickly, it can hardly have done a transcode.) -
Admin almost 2 yearsCorrection, 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.