Subtitle Scan Only

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
transmute
Posts: 7
Joined: Fri Jan 30, 2015 3:31 am

Subtitle Scan Only

Post by transmute »

Is there any way to run a subtitle scan ONLY?

I really just want to find out IF there are any forced subtitles in any of the subtitle tracks.

If I do this:

Code: Select all

HandBrakeCLI --input video.vob --subtitle scan --output /dev/null
HandBrakeCLI outputs the following:

Code: Select all

...
Subtitle Scan Enabled - enabling subtitles if found for foreign language segments
[19:38:16] 2 job(s) to process
...
Encoding: task 1 of 2, 100.00 %[19:40:39] reader: done. 1 scr changes)
...
(after a couple minutes)
...
[19:40:39] Subtitle track 1 (id 0x20bd) 'English': 1072 hits (50 forced)
[19:40:39] Subtitle track 2 (id 0x21bd) 'English (Closed Caption)': 1552 hits (0 forced)
[19:40:39] No candidate detected during subtitle scan
...
Encoding: task 2 of 2, 0.00 %[17:19:43]     Probe: Found stream mpeg2video. stream id 0xe0-0x0
...
(LONG time later)
Encode done!
What I want to do is run that "1st task" without having to wait for the "2nd task"... ie, I just want to see if there are any forced subtitles in any of the subtitle tracks WITHOUT actually re-encoding the entire video.
User avatar
Rodeo
HandBrake Team
Posts: 12760
Joined: Tue Mar 03, 2009 8:55 pm

Re: Subtitle Scan Only

Post by Rodeo »

You can't do it without manually cancelling the second pass, I'm afraid. Patches welcome.
transmute
Posts: 7
Joined: Fri Jan 30, 2015 3:31 am

Re: Subtitle Scan Only

Post by transmute »

Rodeo wrote:You can't do it without manually cancelling the second pass, I'm afraid. Patches welcome.
Thanks, that's kind of what I thought. I did take a look at the source and came up with a pretty simple patch although I wonder if it's the best/most appropriate way to do it. I can explain further, but wonder if you'd prefer I move this discussion to the Development forum?
User avatar
Rodeo
HandBrake Team
Posts: 12760
Joined: Tue Mar 03, 2009 8:55 pm

Re: Subtitle Scan Only

Post by Rodeo »

Up to you. See also https://reviews.handbrake.fr/
transmute
Posts: 7
Joined: Fri Jan 30, 2015 3:31 am

Re: Subtitle Scan Only

Post by transmute »

Rodeo wrote:Up to you. See also https://reviews.handbrake.fr/
All I did was add an option (--scan-subtitles) to "test/test.c", that when enabled skips the "if( twoPass )" if/else statement (line 2861-2906, 0.10.0 source). Essentially, the --scan-subtitles option just prevents the 2nd job from being added to the queue.

If you think that sounds like something that might get accepted in a future release, I'll take a look at the process for submitting a patch.
db1964
Posts: 13
Joined: Thu Jul 30, 2015 11:05 am

Re: Subtitle Scan Only

Post by db1964 »

Hi,
Did you ever submit this ? This is something I'd find useful too.
Post Reply