Unable to load custom preset

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Hazimil
Posts: 8
Joined: Tue Feb 04, 2014 9:54 pm

Unable to load custom preset

Post by Hazimil » Tue Oct 10, 2017 7:34 pm

Please detail your question or problem in as much detail as possible:
I trying to modify one of the presets for the HandBrakeCLI. I wish to use the preset "Matroska/H.264 MKV 1080p30" but I want HandBrake to keep all of the subtitles, which it doesn't if I just use the built in preset. I'm using the CLI as I plan to use it to batch process many .MKV files (once I get it working).

So I exported the preset by using:

Code: Select all

HandBrakeCLI.exe --preset "H.264 MKV 1080p30" --preset-export Jonathans --preset-export-file Jonathans.json
I then edited the Jonathans.json file and changed:

Code: Select all

"SubtitleTrackSelectionBehavior": "none",
to

Code: Select all

"SubtitleTrackSelectionBehavior": "all",
I then tried to run HandBrakeCLI with the following command line:

Code: Select all

HandBrakeCLI.exe --preset-import-file Jonathans.json --verbose -i test.mkv -o test_done.mkv
However, the new .MKV file doesn't have the subtitles in it. I noticed in the log, that the process doesn't seem to use my preset (see below).

Code: Select all

Using preset: CLI Default
So, I thought that perhaps I have to load the preset first, so I ran the command:

Code: Select all

HandBrakeCLI.exe --preset-import-file Jonathans.json
But all that did was:

Code: Select all

[20:21:57] hb_init: starting libhb thread
[20:21:57] thread 1 started ("libhb")
Missing input device. Run HandBrakeCLI.exe --help for syntax.
Tell us about your environment. What version of HandBrake? What operating system are you running. etc.
Windows 10 Pro x64 (fully patched)
HandBrakeCLI v1.0.7
I am using a test .MKV file called "test.mkv", which has a MPEG-1/2 video track, an AC-3 audio track, VocSub subtitle track and 6 chapters.

If there was any exception or error displayed, please copy it and paste it here:
None

Please include the scan or encode log:
Activity Log: https://pastebin.com/SXvWujsc
Jonathans.json file: https://pastebin.com/guapP65i

Any and all help appreciated.

Jonathan

Woodstock
Veteran User
Posts: 2665
Joined: Tue Aug 27, 2013 6:39 am

Re: Unable to load custom preset

Post by Woodstock » Tue Oct 10, 2017 7:55 pm

BradleyS wrote:
Tue Oct 10, 2017 2:04 pm
--preset=“Apple 1080p30 Surround”
The = sign is missing from your command line.

Hazimil
Posts: 8
Joined: Tue Feb 04, 2014 9:54 pm

Re: Unable to load custom preset

Post by Hazimil » Wed Oct 11, 2017 7:03 am

Woodstock wrote:
Tue Oct 10, 2017 7:55 pm
The = sign is missing from your command line.
I'm afraid this doesn't help, it still fails to work as I'm expecting/hope.

Jonathan

User avatar
Ritsuka
HandBrake Team
Posts: 983
Joined: Fri Jan 12, 2007 11:29 am

Re: Unable to load custom preset

Post by Ritsuka » Wed Oct 11, 2017 7:32 am

--preset-import-file reads the preset, then you have to use --preset to select it.

Hazimil
Posts: 8
Joined: Tue Feb 04, 2014 9:54 pm

Re: Unable to load custom preset

Post by Hazimil » Thu Oct 12, 2017 9:48 am

Ritsuka wrote:
Wed Oct 11, 2017 7:32 am
--preset-import-file reads the preset, then you have to use --preset to select it.
Cheers Ritsuka, that worked (sort off), I used the command line:

Code: Select all

HandBrakeCLI.exe --preset-import-file "Jonathans.json" --preset "Jonathans" --verbose -i test.mkv -o test_done.mkv
The CLI now reports it is using the preset "Jonathans", however it's burning in the subtitles instead of keeping them separate, need to do some tweaking to my .json file? :(

Thanks for the help.

Jonathan

User avatar
Rodeo
HandBrake Team
Posts: 11912
Joined: Tue Mar 03, 2009 8:55 pm

Re: Unable to load custom preset

Post by Rodeo » Thu Oct 12, 2017 12:49 pm

Hazimil wrote:
Thu Oct 12, 2017 9:48 am
Ritsuka wrote:
Wed Oct 11, 2017 7:32 am
--preset-import-file reads the preset, then you have to use --preset to select it.
Cheers Ritsuka, that worked (sort off), I used the command line:

Code: Select all

HandBrakeCLI.exe --preset-import-file "Jonathans.json" --preset "Jonathans" --verbose -i test.mkv -o test_done.mkv
The CLI now reports it is using the preset "Jonathans", however it's burning in the subtitles instead of keeping them separate, need to do some tweaking to my .json file? :(
Encode log please :)

DougH
Posts: 18
Joined: Fri Sep 23, 2016 12:52 am

Re: Unable to load custom preset

Post by DougH » Fri Oct 13, 2017 12:36 pm

Just as a side note if the subtitles are stored in PGS format they will always burn-in no matter the setting. I found this out the hard way. I had to convert PGS subtitles to the VOB subtitles.

Woodstock
Veteran User
Posts: 2665
Joined: Tue Aug 27, 2013 6:39 am

Re: Unable to load custom preset

Post by Woodstock » Fri Oct 13, 2017 12:59 pm

Subtitles only need to be burned in when the file format isn't supported by the container. PGS is allowed in MKV files, but not MP4, for example.

Sometimes, though, the handbrake renderer is MUCH better than you'll find in the typical player, and you want to burn them in (typically with well-done ASS subtitles).

Post Reply