Page 1 of 1

subtitle gibberish

Posted: Sat Apr 21, 2018 11:41 pm
by billschu
Description of problem or question:
subtitle is random gibberish(not a foreign language)
Steps to reproduce the problem (If Applicable):
HandBrakeCLI -5 --start-at duration:00:02:20 --stop-at duration:30 -e x265 --encoder-preset fast -q 30 -a 2 -s 1 -A 1804 -i /m/r2/raw/drugsinc-09-06.ts -o /m/t1/doc_____/d/drugsinc/drugsinc-09-06cl8a2s1.mp4 2>/m/t1/doc_____/d/drugsinc/_0drugsinc-09-06cl8a2s1.txt
HandBrake version (e.g., 1.0.0):
Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Ubuntu 16.04 64 bit
HandBrake Activity Log ***required***

Have tried various ghb subtitle options including default - no joy
Have tried various --subtitle-forced, etc. also no joy
source is GCI cable and the problem occurs on different channels but not consistently
In this case there are subtitles burned into the video and there is a separate subtitle stream for the commentator. It's the "commentator" subtitles that don't show. But it's also occurred where there are no foreign language issues, I.E. The Daily Show

VLC does play back the "commentator" subtitles properly.
IF I preprocess the raw ts file to another ts file using ProjectX then HandBrakeCLI does pick up the "commentator" subtitles properly. That activity log also shows...
"subtitle track 1, English, Closed Caption [CC608] (track 0, id 0x0, Text) -> Passthrough"

Re: subtitle gibberish

Posted: Sun Apr 22, 2018 2:01 pm
by Woodstock
The log you posted finds one Closed Caption stream. Your settings are to search for a "foreign audio" caption stream and burn it in, and to pass through the first subtitle track.

The scan found no suitable track to burn in, due to how "foreign audio" subtitle tracks are defined, so you just got the one track passed through as a "switchable" subtitle track, which may or may not be supported by your player.

If you want the CC track to be burned in, you should select it on the subtitle tab, and check burn in. In this case, the search function doesn't suit the source.

Re: subtitle gibberish

Posted: Sun Apr 22, 2018 8:12 pm
by billschu
Thanks Woodstock, in ghb selecting closed caption does not work but what I need is to select it from the commandline
98% of the time the -s 1 switch gets me switchable subtitles and those activity logs all show closed-captioning (usually CC608 but sometimes iso639) and passthru
In every case in the 2% that do not work, preprocessing with ProjectX results in a TS file upon which the -s 1 commandline switch now works

So, from the commandline, my assumption is the rare file that does not work with the -s 1 switch has something the defaults aren't working on. In the docs, I see no commandline switches to find and force the closed caption stream to a switchable stream in track 1.

As to player support, vlc has better support than mpv but it only "finds" one subtitle track - the gibberish one. In the 98% of files that the -s 1 commandline option "works" on both players switch the english subtitles on and off fine.

So, my guess is as long as the closed captioning in the source is on track 1 everything is fine. In cases where for whatever reason a particular network puts the cc stream in track 2,3,4 HandBrakeCLI can't find it because -s 2,3,4 is not supported yet? "PreProcessing" with ProjectX "fixes" it because part of what it does is to move the cc stream to track 1? I could simply pre-process everything with ProjectX but that relabels all the audio tracks to english so you can't select audio by english only which I want due to smaller file sizes.

If I'm on the wrong track, exactly what commandline switches should I try?

Re: subtitle gibberish

Posted: Sun Apr 22, 2018 10:30 pm
by Woodstock
What is the actual command line you're using for this source?

I have not worked much with closed captions, because they're rare in what I rip and encode. Not to mention they would normally be in the wrong language... I can't read Japanese yet. ;)

Re: subtitle gibberish

Posted: Mon Apr 23, 2018 8:58 pm
by billschu
actual command is in my original post under steps to recreate problem