Lossless conversion of MKV to MP4 with Handbrake

FransAlkemade picture FransAlkemade · Feb 10, 2015 · Viewed 73.5k times · Source

What is the argument that I need to provide to prevent Handbrake from losing the quality of the source video when converting to MP4. I've read over all the documentation and I can see where it throttles but I can't find how to tell Handbrake to just ignore the default settings and keep the existing settings.

Answer

Fallere picture Fallere · Feb 11, 2015

If I understand you correctly, you just want to change the video from mkv to mp4 without changing the actual video. in this case, handbrake is the wrong tool for you, as it can only re-encode the video. But in yourcase, copying the video (and audio) would be more efficient. To do that, use ffmpeg. Google ffmpeg, and install the version for you OS. On windows, use the included batch file to open the ffmpeg prompt, on Linux just use the terminal. In both cases use this:

ffmpeg -i /path/to/video.mkv -c:v copy -c:a copy /path/to/save/video.mp4

That will create a copy of your video in .mp4 format, andgoes as fast as just copying the file would go.

In case you want to re-encode your video lossless, just use handbrake with constant quality andset the crf value to 18. It's not actually lossless that way, but you wouldn't be able to tell the difference.