Page 1 of 1

Adding subtitles to a Preset in CLI

Posted: Wed Apr 03, 2019 8:13 pm
by SpaceAvenger
Description of problem or question:
I've been running this script for a number of years successfully. The only issue is some shows have sections where a different language is spoken and subtitles are shown during this time. I'd like to be able to just add these subtitles without messing with the preset video/audio settings. Is there a way to do this?

for filename in $(cat /var/HandBrakeScript/Moviesprocessed); do
echo "$filename"

HandBrakeCLI -i "$filename" -o "${filename%.*}".mp4 --preset="Super HQ 720p30 Surround"

rm -r "$filename"

done

Steps to reproduce the problem (If Applicable):




HandBrake version (e.g., 1.0.0):
1.2.2



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Ubuntu Server 18.04



HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

Please replace this text with the contents of your log file between the two code tags - OR -  provide a pastebin URL in place of these 3 lines.

Re: Adding subtitles to a Preset in CLI

Posted: Wed Apr 03, 2019 9:04 pm
by Woodstock
--subtitle 1-99

Will add all available subtitles (all being 99 or fewer).

If you want handbrake to do an extra pass to see if it can find the "foreign language" subtitles:

--subtitle scan --subtitle-forced

Re: Adding subtitles to a Preset in CLI

Posted: Thu Apr 04, 2019 2:52 pm
by SpaceAvenger
Argg... I swear I tried adding --subtitle # at the end of the line but it didn't work. Tried it again today and now it does. Thank you for your time and help on this. I figured it was a simple fix and, like I said, I attempted adding that setting before but perhaps I made a syntax or spelling error.

Re: Adding subtitles to a Preset in CLI

Posted: Thu Apr 04, 2019 4:30 pm
by Woodstock
You might have done what I did when I first posted the reply... put an S at the end of --subtitle ... :roll:

Re: Adding subtitles to a Preset in CLI

Posted: Thu Apr 04, 2019 9:55 pm
by SpaceAvenger
Quite possible. Wouldn't have been the first time a single character threw me for a long loop. I'm no expert but I'm also not a newb at this sort of stuff. When I figure it out it just makes me want to slam my head in a door. LOL