Including ALL subtitles, but only burning in forced ones.

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
HighMans
Posts: 5
Joined: Fri Aug 17, 2018 2:15 pm

Including ALL subtitles, but only burning in forced ones.

Post by HighMans »

Description of problem or question:

What are the arguments I need to include all the subtitles, but only burn-in subtitles which are forced?

HandBrake version (e.g., 1.0.0):

1.1.1

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

Ubuntu 18.04 LTS
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Including ALL subtitles, but only burning in forced ones.

Post by Woodstock »

It varies with the source. You can try using the "foreign audio scan" method for the first subtitle track ("--subtitle scan,1,2,3") with "--subtitle-burn=1" as an argument, but there are sources that scan won't find the right track to use.
HighMans
Posts: 5
Joined: Fri Aug 17, 2018 2:15 pm

Re: Including ALL subtitles, but only burning in forced ones.

Post by HighMans »

This is what I was trying before:

--all-subtitles --subtitle scan --subtitle-forced

It worked in the sense that all the subtitles were included, but failed because it burnt in the english subtitles (which aren't forced). I can do it in handbrake (Foreign Audio Scan -- Forced Only and Burn-In and then import the remaining.)

Image

I also tried your suggestion:

--subtitle scan -F --subtitle-burned=1,2,3 --subtitle-default and it seems to work, only issue is that I don't always know if there will be 3 subtitles, there might be 8, or 1, etc. How do I set it so it includes all?
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Including ALL subtitles, but only burning in forced ones.

Post by Woodstock »

Interesting question. I have no idea whether wildcards are acceptable, or if combining would work, like:

--subtitle scan --all-subtitles --subtitle-burned=1

I do know that if you specify a track that doesn't exist, handbrake will ignore it, so --subtitle scan,1,2,3,4,5,6,7,8 should work.
Deleted User 11865

Re: Including ALL subtitles, but only burning in forced ones.

Post by Deleted User 11865 »

Note: only one track can be burned-in. Otherwise you'd have overlaps and an unreadable mess.

--all-subtitles and --subtitle are mutually exclusive and incompatible (the CLI should error out if you attempt to use both, not sure whether that's only in git master or already in 1.1.x).

FWIW, you can also use subtitle ranges with the --subtitle option.

I haven't tested it, but based on a quick read of the CLI source code, either of the following should work:

Code: Select all

--subtitle scan,1-99 --subtitle-forced=1 --subtitle-burned=1

Code: Select all

--subtitle scan,1-99 --subtitle-forced=1 --subtitle-burned=scan
HighMans
Posts: 5
Joined: Fri Aug 17, 2018 2:15 pm

Re: Including ALL subtitles, but only burning in forced ones.

Post by HighMans »

@Rodeo

That worked, but I get duplicate subtitles now...
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Including ALL subtitles, but only burning in forced ones.

Post by mduell »

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.
HighMans
Posts: 5
Joined: Fri Aug 17, 2018 2:15 pm

Re: Including ALL subtitles, but only burning in forced ones.

Post by HighMans »

I've attached requisite logs. My apologies.

https://pastebin.com/fZTKmJY5
HighMans
Posts: 5
Joined: Fri Aug 17, 2018 2:15 pm

Re: Including ALL subtitles, but only burning in forced ones.

Post by HighMans »

Oops. I recant my previous statement, there are supposed to be that many subtitles. Thanks again!
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Including ALL subtitles, but only burning in forced ones.

Post by Woodstock »

I was about 52% certain that the range would work, but I didn't have time to test it before posting. :)

Note that, if the scan doesn't find a usable set of "forced" subtitles, the first regular track will get burned in.
Deleted User 11865

Re: Including ALL subtitles, but only burning in forced ones.

Post by Deleted User 11865 »

Woodstock wrote: Sat Aug 18, 2018 1:51 amNote that, if the scan doesn't find a usable set of "forced" subtitles, the first regular track will get burned in.
If it does, please post a log -- pretty sure this should be considered a bug.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Including ALL subtitles, but only burning in forced ones.

Post by Woodstock »

I wouldn't consider it a bug - The first subtitle track would get burned in. It's just that "first" would not be the FAS choice, just the first in the list of subtitles found.

Right now I don't have anything that would trip up the scan, so I can't try it.
Post Reply