I just signed up to comment on how incredibly helpful this thread was. I love MCEBuddy and the automation it brings to my workflow, but it’s also incredibly liberating to be able to use a Handbrake preset that I’ve spent weeks refining in the Handbrake GUI.
I’ve also put some effort into streamlining this configuration. I found that the video and audio directives are unneeded (and unused with the handbrake-VideoOptimized and handbrake-AudioOptimized flags), since Handbrake bypasses them with the preset, and there is no need to define them multiple times. I found that 2pass=true does nothing in this scenario. And I found that, at least in current versions of Handbrake, I needed to define the actual preset name in the command line arguments or Handbrake would not use the preset from the file at all. The preset name specified by “–preset” in profiles.conf must match the value of the “PresetName” field in the .json file. If they don’t already match, edit the profiles.conf text, the .json file text, or both.
Conversion tasks in MCEBuddy that use this profile should also have this option enabled: Advanced Settings → Expert Settings → “Skip remuxing files”.
Lastly, I found that while I made my Handbrake preset as comprehensive as I could in terms of finding and adding subtitles to my output MKV file, Handbrake can’t automatically import subtitles from a .srt file using a preset; that’s always a manual step. So I added custom commands to my MCEBuddy profile to automate it anyway. It looks for a .srt file alongside the input file with the same name, and if it exists, then after the Handbrake step using mkvmerge, muxes it into the MKV (in the temp directory) as the primary English subtitle track, and omits copying the .srt file to the destination. This works great for me!
For troubleshooting purposes, I also found it helpful to increase the log level to “Debug” in Settings → General Settings → System Settings to see the composed commands as they were executing.
Here is my final profile config from profiles.conf:
[Handbrake preset - MudHut_v4,AndTV_VlcKodi,Pana_Bluray,720pHQ,h264,aac,allaudio,allsubs]
Description=Explicitly uses a custom Handbrake preset and bypasses MCEBuddy's audio and video settings. Preset: MudHut_v4,AndTV_VlcKodi,Pana_Bluray,720pHQ,h264,aac,allaudio,allsubs
handbrake-general=--preset-import-file MudHut_v4,AndTV_VlcKodi,Pana_Bluray,720pHQ,h264,aac,allaudio,allsubs.json --preset MudHut_v4,AndTV_VlcKodi,Pana_Bluray,720pHQ,h264,aac,allaudio,allsubs
CustomCommandParameters=/s /c "if exist "%srtfile%" "C:\Program Files\MCEBuddy2x\mkvmerge\mkvmerge.exe" -o "%convertedfile%-remux.tmp" "%convertedfile%" --default-track "0:yes" --track-name "0:English" --language "0:eng" "%srtfile%"&&move /y "%convertedfile%-remux.tmp" "%convertedfile%"&echo.n|del "%srtfile%""