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.
4 Answers
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.
-
Tried several times and always messes up the audio sample and bit rate :\ Feb 26, 2017 at 23:16
-
-
If you don't like to use command line, Install WinFF, it's free and open source, it's a front end for ffmpeg for Windows.– ShayanMay 7, 2019 at 14:18
-
Handbrake does not Remux MKV or MP4.
REMUX: A rip of Blu-ray or HD DVD disk to another container format or just stripping the disc of menus and bonus material while keeping the contents of its audio and video streams intact, guaranteeing the exact 1:1 movie quality as on original disk.
MKV and MP4 are just containers.
Looks like you just want to Remux the video and audio into a new container, without re-converting the video and audio.
To do so just download Xmedia Recode and it will allow you to Remux your video file, (basically it just places the contents of whats in your MKV file into a new MP4 container, or vise-versa.
Check out this Xmedia Recode How to guide MKV to MP4: http://www.dvd-guides.com/guides/mobile-video/249-rip-dvd-convert-avi-mkv-to-android
And it will only take seconds or minutes depending on the file.
Also you can look at MKVToolNix for remuxing video and audio.
-
Great tool, but tried several conversion / copy processes and always messes up the audio sample and bit rate :\ Feb 26, 2017 at 23:12
-
When using Xmedia Recode you need to set BOTH the
video
andaudio
tocopy
from both dropdowns, then it just remux's the video and audio from MKV to MP4. Feb 27, 2017 at 16:25 -
That's what i've done! COPY on both! used 2 different video / audio sources, same result! :\ The problem is not this tool, cause i have the same problems using ffmpeg Feb 28, 2017 at 15:31
-
@marcolopes that is weird, i never had that issue using
Xmedia Recode
. Keep in mind that if there is more than one audio source you have to doCOPY
for each audio source. But that is very weird indeed. Feb 28, 2017 at 15:36 -
@marcolopes Try and see if you can bring the file in
MKVToolNix
and see what is inside that file that might be causing this issue with it. videohelp.com/software/mkvtoolnix Feb 28, 2017 at 15:59
If you're using from OBS Studio, it recommends writing .mkv
files. Because of this, it also comes with a built-in Remux tool which does what you want:
Using this tool gets you a lossless conversion of MKV to MP4. The reason they recommend MKV files is because they're better about saving in the event of a power-outage or sudden program crash. Once you've finished recording, remuxing back to MP4 is safe.
After many hours searching, i found a GUI for FFmpeg that does the trick! https://sourceforge.net/projects/ffmpegyag/
That is the only tool i found that will do the container conversion without messing up the audio file (it uses the right FFmpeg CMD, that can be SAVED as SCRIPT for later use!).
I set the interface parameters of VIDEO and AUDIO CODEC to COPY (other parameters stay as DEFAULT / NO CHANGE)