"Foreign audio scan" in preset should enable "Forced only"

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
F J Walter
Posts: 14
Joined: Tue Jul 29, 2014 4:08 am

"Foreign audio scan" in preset should enable "Forced only"

Post by F J Walter »

Please select "Forced only" for "Foreign audio scan" by default when it's specified as a default in a preset.

Currently if I have a preset in which it's set to add a foreign audio scan as a default, this is always added WITHOUT the "Forced" checkbox. So I have to always go into the subtitle tab and check "Forced only" next to the foreign audio scan by hand for each video I load.

"Foreign audio scan" is considerably less useful without the "Forced only" checkbox ticked, so having this default to off loses out on most of its usefulness.

WITH the checkbox

* It finds foreign dialogue subtitles in a separate subtitle track, by counting the subtitles, even if not marked "Forced".
* OR it finds foreign dialogue subtitles in any track if they are marked "Forced".

But WITHOUT the checkbox

* It only finds the first type: it won't find them if they are marked forced.

Therefore there's no real reason to not have this ticked for "Foreign audio scan". Unlike the label implies, it is not forced "only" when using a foreign audio search - but instead the "Forced only" actually is a superset of both Forced and non-forced, whereas without this checked it will ONLY find non-forced.

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Woodstock »

Not to start an argument, but...
"Foreign audio scan" is considerably less useful without the "Forced only" checkbox ticked, so having this default to off loses out on most of its usefulness.
That is true IF you are the type that never deals with non-dubbed video sources. For those of us who do a lot of native-audio subtitled stuff, "forced only" would be problematic. One title I am encoding right now has forced Japanese subtitles, in addition to the English, because it is a mixed-language audio title.

Saving the state of the "Forced only" flag in the preset, on the other hand, would be a very good change.

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Rodeo »

Woodstock wrote:Not to start an argument, but...
"Foreign audio scan" is considerably less useful without the "Forced only" checkbox ticked, so having this default to off loses out on most of its usefulness.
That is true IF you are the type that never deals with non-dubbed video sources. For those of us who do a lot of native-audio subtitled stuff, "forced only" would be problematic.
Can you please elaborate?

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Woodstock »

If (as proposed) using "Foreign audio scan" also defaulted to "Forced Only", there are circumstances where this would grab the wrong (or no) subtitle track. One of the disks I have right now is Japanese audio, with English subtitles, but it also has a Japanese subtitle track, because some of the audio is NOT in Japanese. Similar to the subtitling done for the native speech in Avatar, even with English audio.

When dealing with dubbed sources, the forced subtitle track for English would (generally) be the smallest track. But, in this case, the smallest subtitle track is Japanese, which isn't very helpful to me.

This is where being able to save the value of the "forced only" flag itself in the profile would work for both my situation AND the OP's.

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Rodeo »

Can you do a Foreign Audio Search scan for that title (forced only on or off, I only care about the statistics) and post the log?

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Woodstock »

Does it matter which version of HB I use for this? The version I use most often is rather old... because it still can generate a batch file from the queue.

Also, I noticed that the disk I was using didn't include the Japanese forced track. I'd have to dig out one of my other titles to get the exact situation I was describing. It usually happens on disks I imported directly.

Here is the log from the one I am working on; it reports "No candidate detected during subtitle scan":

Code: Select all

HandBrake svn4714 2012060701
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CPU: AMD Phenom(tm) II X4 940 Processor
Ram: 3581 MB, Screen: 1680x1050
Temp Dir: C:\Users\jeffb\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\jeffb\AppData\Roaming\HandBrake\HandBrake\0.9.6.4713

-------------------------------------------
CLI Query:  -i "Z:\Devil is a Part Timer\Devil is a Part Timer HD01.mkv" -t 1 -c 1-5 -o "e:\ripshare\Devil is a Part Timer HD01.mkv"  -f mkv --detelecine --decomb -w 1920 --loose-anamorphic  -e x264 -q 20 --vfr  -a 1,1,1,3,4 -E faac,ffac3,faac,faac,faac -B 160,160,160,160,160 -6 dpl2,auto,dpl2,dpl2,dpl2 -R Auto,Auto,Auto,Auto,Auto -D 0,0,0,0,0 --gain=0,0,0,0,0 --audio-copy-mask none --audio-fallback ffac3 --subtitle scan --subtitle-forced=1 --markers="C:\Users\jeffb\AppData\Local\Temp\Devil is a Part Timer HD01-1-chapters.csv" -x b-adapt=2:rc-lookahead=50 --verbose=1
User Query: True

[21:14:14] hb_init: starting libhb thread
HandBrake svn4714 (2012060701) - MinGW x86_64 - http://handbrake.fr
4 CPUs detected
Opening Z:\Devil is a Part Timer\Devil is a Part Timer HD01.mkv...
[21:14:14] hb_scan: path=Z:\Devil is a Part Timer\Devil is a Part Timer HD01.mkv, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening Z:\Devil is a Part Timer\Devil is a Part Timer HD01.mkv/BDMV/index.bdmv
libbluray/bluray.c:1471: nav_get_title_list(Z:\Devil is a Part Timer\Devil is a Part Timer HD01.mkv) failed (00000000003209D0)
[21:14:14] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.11 for DVD access
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[21:14:14] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'Z:\Devil is a Part Timer\Devil is a Part Timer HD01.mkv':
  Metadata:
    title           : Devil is a Part Timer HD01
  Duration: 00:23:46.97, start: 0.000000, bitrate: 832 kb/s
    Chapter #0.0: start 0.000000, end 258.299708
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 258.299708, end 818.984833
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 818.984833, end 1325.949625
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 1325.949625, end 1415.956208
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 1415.956208, end 1426.976000
    Metadata:
      title           : Chapter 05
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: truehd, 48000 Hz, 5.1, s32 (default)
    Metadata:
      title           : Surround 5.1
    Stream #0.2(eng): Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
    Metadata:
      title           : Surround 5.1
    Stream #0.3(jpn): Audio: truehd, 48000 Hz, stereo, s32
    Metadata:
      title           : Stereo
    Stream #0.4(jpn): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
    Metadata:
      title           : Stereo
    Stream #0.5(eng): Audio: truehd, 48000 Hz, stereo, s32
    Metadata:
      title           : Stereo
    Stream #0.6(eng): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
    Metadata:
      title           : Stereo
    Stream #0.7(eng): Subtitle: pgssub
    Stream #0.8(eng): Subtitle: pgssub
[21:14:14] scan: decoding previews for title 1
[21:14:14] scan: audio 0x2: AC-3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[21:14:14] scan: audio 0x4: AC-3, rate=48000Hz, bitrate=192000 Japanese (AC3) (2.0 ch)
[21:14:14] scan: audio 0x6: AC-3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch)
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
Scanning title 1...
[21:14:17] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[21:14:17] scan: title (0) job->width:1920, job->height:1072
[21:14:17] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: Z:\Devil is a Part Timer\Devil is a Part Timer HD01.mkv
  + duration: 00:23:46
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:04:18
    + 2: cells 0->0, 0 blocks, duration 00:09:21
    + 3: cells 0->0, 0 blocks, duration 00:08:27
    + 4: cells 0->0, 0 blocks, duration 00:01:30
    + 5: cells 0->0, 0 blocks, duration 00:00:11
  + audio tracks:
    + 1, English (truehd) (5.1 ch) (iso639-2: eng)
    + 2, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
    + 3, Japanese (truehd) (2.0 ch) (iso639-2: jpn)
    + 4, Japanese (AC3) (2.0 ch) (iso639-2: jpn), 48000Hz, 192000bps
    + 5, English (truehd) (2.0 ch) (iso639-2: eng)
    + 6, English (AC3) (2.0 ch) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(PGS)
    + 2, English (iso639-2: eng) (Bitmap)(PGS)
Reading chapter markers from file C:\Users\jeffb\AppData\Local\Temp\Devil is a Part Timer HD01-1-chapters.csv
Subtitle Scan Enabled - enabling subtitles if found for foreign language segments
[21:14:17] 2 job(s) to process
[21:14:17] starting job
[21:14:17] yadif thread started for segment 0
[21:14:17] yadif thread started for segment 1
[21:14:17] yadif thread started for segment 2
[21:14:17] yadif thread started for segment 3
[21:14:17] decomb thread started for segment 0
[21:14:17] decomb thread started for segment 2
[21:14:17] decomb thread started for segment 1
[21:14:17] decomb thread started for segment 3
[21:14:17] sync: expecting 34213 video frames
[21:14:17] job configuration:
[21:14:17]  * source
[21:14:17]    + Z:\Devil is a Part Timer\Devil is a Part Timer HD01.mkv
[21:14:17]    + title 1, chapter(s) 1 to 5
[21:14:17]    + container: matroska,webm
[21:14:17]    + data rate: 832 kbps
[21:14:17]  * destination
[21:14:17]    + e:\ripshare\Devil is a Part Timer HD01.mkv
[21:14:17]    + container: Matroska (.mkv)
[21:14:17]      + chapter markers
[21:14:17]  * video track
[21:14:17]    + decoder: h264
[21:14:17]    + frame rate: same as source (around 23.976 fps)
[21:14:17]    + filters
[21:14:17]      + Detelecine (pullup) (default settings)
[21:14:17]      + Decomb (default settings)
[21:14:17]      + Framerate Shaper (0:27000000:1126125)
[21:14:17]        + frame rate: same as source (around 23.976 fps)
[21:14:17]      + Crop and Scale (1920:1072:0:0:0:0)
[21:14:17]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1072
[21:14:17]    + loose anamorphic
[21:14:17]      + storage dimensions: 1920 * 1072, mod 0
[21:14:17]      + pixel aspect ratio: 134 / 135
[21:14:17]      + display dimensions: 1905 * 1072
[21:14:17]  * Foreign Audio Search: Passthrough, Forced Only
[21:14:17]    + subtitle, English (track 7, id 0x7) Picture [PGS]
[21:14:17]    + subtitle, English (track 8, id 0x8) Picture [PGS]
[21:15:29] reader: done. 1 scr changes
[21:15:29] work: average encoding speed for job is 0.000000 fps
[21:15:29] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[21:15:29] render: lost time: 0 (0 frames)
[21:15:29] render: gained time: 0 (0 frames) (0 not accounted for)
[21:15:29] h264-decoder done: 0 frames, 0 decoder errors, 0 drops
[21:15:29] Subtitle track 7 (id 0x7) 'English': 358 hits (0 forced)
[21:15:29] Subtitle track 8 (id 0x8) 'English': 81 hits (0 forced)
[21:15:29] No candidate detected during subtitle scan
[21:15:29] starting job
[21:15:29] yadif thread started for segment 0
[21:15:29] yadif thread started for segment 3
[21:15:29] yadif thread started for segment 2
[21:15:29] yadif thread started for segment 1
[21:15:29] decomb thread started for segment 0
[21:15:29] decomb thread started for segment 1
[21:15:29] decomb thread started for segment 2
[21:15:29] decomb thread started for segment 3
[21:15:29] work: mixdown not specified, track 2 setting mixdown 6-channel discrete
[21:15:29] work: sanitizing track 2 audio bitrate 160 to 192
[21:15:29] work: sanitizing track 4 mixdown Dolby Pro Logic II to Stereo
[21:15:29] work: sanitizing track 5 mixdown Dolby Pro Logic II to Stereo
[21:15:29] sync: expecting 34213 video frames
[21:15:29] job configuration:
[21:15:29]  * source
[21:15:29]    + Z:\Devil is a Part Timer\Devil is a Part Timer HD01.mkv
[21:15:29]    + title 1, chapter(s) 1 to 5
[21:15:29]    + container: matroska,webm
[21:15:29]    + data rate: 832 kbps
[21:15:29]  * destination
[21:15:29]    + e:\ripshare\Devil is a Part Timer HD01.mkv
[21:15:29]    + container: Matroska (.mkv)
[21:15:29]      + chapter markers
[21:15:29]  * video track
[21:15:29]    + decoder: h264
[21:15:29]    + frame rate: same as source (around 23.976 fps)
[21:15:29]    + filters
[21:15:29]      + Detelecine (pullup) (default settings)
[21:15:29]      + Decomb (default settings)
[21:15:29]      + Framerate Shaper (0:27000000:1126125)
[21:15:29]        + frame rate: same as source (around 23.976 fps)
[21:15:29]      + Crop and Scale (1920:1072:0:0:0:0)
[21:15:29]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1072
[21:15:29]    + loose anamorphic
[21:15:29]      + storage dimensions: 1920 * 1072, mod 0
[21:15:29]      + pixel aspect ratio: 134 / 135
[21:15:29]      + display dimensions: 1905 * 1072
[21:15:29]    + encoder: H.264 (x264)
[21:15:29]      + options: b-adapt=2:rc-lookahead=50
[21:15:29]      + quality: 20.00 (RF)
[21:15:29]  * audio track 1
[21:15:29]    + decoder: English (truehd) (5.1 ch) (track 1, id 0x1)
[21:15:29]    + mixdown: Dolby Pro Logic II
[21:15:29]    + encoder: AAC (faac)
[21:15:29]      + bitrate: 160 kbps, samplerate: 48000 Hz
[21:15:29]  * audio track 2
[21:15:29]    + decoder: English (truehd) (5.1 ch) (track 1, id 0x1)
[21:15:29]    + mixdown: 6-channel discrete
[21:15:29]    + encoder: AC3 (ffmpeg)
[21:15:29]      + bitrate: 192 kbps, samplerate: 48000 Hz
[21:15:29]  * audio track 3
[21:15:29]    + decoder: English (truehd) (5.1 ch) (track 1, id 0x1)
[21:15:29]    + mixdown: Dolby Pro Logic II
[21:15:29]    + encoder: AAC (faac)
[21:15:29]      + bitrate: 160 kbps, samplerate: 48000 Hz
[21:15:29]  * audio track 4
[21:15:29]    + decoder: Japanese (truehd) (2.0 ch) (track 3, id 0x3)
[21:15:29]    + mixdown: Stereo
[21:15:29]    + encoder: AAC (faac)
[21:15:29]      + bitrate: 160 kbps, samplerate: 48000 Hz
[21:15:29]  * audio track 5
[21:15:29]    + decoder: Japanese (AC3) (2.0 ch) (track 4, id 0x4)
[21:15:29]      + bitrate: 192 kbps, samplerate: 48000 Hz
[21:15:29]    + mixdown: Stereo
[21:15:29]    + encoder: AAC (faac)
[21:15:29]      + bitrate: 160 kbps, samplerate: 48000 Hz
[21:15:30] reader: first SCR 0 id 0x0 DTS 0
[21:15:30] encx264: min-keyint: 24, keyint: 240
[21:15:30] encx264: encoding with stored aspect 134/135
[21:15:30] encx264: Encoding at constant RF 20.000000
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=134/135
x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
x264 [info]: profile High, level 4.0

mduell
Veteran User
Posts: 7143
Joined: Sat Apr 21, 2007 8:54 pm

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by mduell »

0.9.6 hasn't been supported in years... post a scan log from the nightly.

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Woodstock »

[21:14:14] hb_init: starting libhb thread
HandBrake svn4714 (2012060701) - MinGW x86_64 - http://handbrake.fr
The system was installed way back when 0.9.6 was current, and directories were created. But I will grant that the nightly used is very old... Because it was the last one I found that still supported exporting queues to batch files.

To get a scan with a more recent version will require going to a different machine.

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Rodeo »

I only care about the statistics, the version doesn't matter in this case. I'll review this later.

F J Walter
Posts: 14
Joined: Tue Jul 29, 2014 4:08 am

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by F J Walter »

Woodstock wrote: Saving the state of the "Forced only" flag in the preset, on the other hand, would be a very good change.
I too would be satisfied by that. Only reason I didn't suggest it is that changing a default is a relatively trivial change, whereas that would require UI changes, strings etc making it a more complex change.
One title I am encoding right now has forced Japanese subtitles, in addition to the English, because it is a mixed-language audio title.
I am probably just not reading this right, but wouldn't you just want no foreign audio scan at all in that case, and rely on the appropriate subtitle track instead? How would a "foreign audio scan" help in that case, with or without checking for forced-ness?

Do I have this right:

Audio track is marked Japanese, but contains some English or other languages (as "foreign" dialogue).

You're selecting an English subtitle track.

You don't want any foreign audio scan, because the English subtitle track should cover anything that's not English.

I haven't encountered a situation where I specifically didn't want "Foreign audio scan" to find forced subtitles yet, but I'm not discounting the possibility that there are some discs where you'd need to work around some weird subtitling issues. Thing is, can't they be catered for manually? We're talking about the "defaults" capability of the subtitles tab here.

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Woodstock »

No, there is a "third language" (allegedly alien) involved, which is subtitled in ALL languages. Think "Hunt for Red October", where the conversations in Russian are actually IN Russian at the start of the movie, and subtitled in whatever language you're watching in, including English.

Actually, since I'd never seen the foreign audio scan work, I stopped trying to use it years ago. I have MakeMKV rip EVERYTHING on the DVD or BD, then explicitly tell Handbrake what to put in the final "product". And most of what I'm working with doesn't use the "forced" flag at all - what could be tagged as forced is really its own track.

I also use the command line and batch files if there is more than one file to process.

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Rodeo »

Woodstock wrote:

Code: Select all

[21:15:29] Subtitle track 7 (id 0x7) 'English': 358 hits (0 forced)
[21:15:29] Subtitle track 8 (id 0x8) 'English': 81 hits (0 forced)
So, which of these tracks is correct? In this case, neither would be selected, but that's a threshold issue, checking Forced Only would make no difference (it almost never does, the ability of not select it is only really left in for developer testing).
Woodstock wrote:Actually, since I'd never seen the foreign audio scan work, I stopped trying to use it years ago. I have MakeMKV rip EVERYTHING on the DVD or BD, then explicitly tell Handbrake what to put in the final "product". And most of what I'm working with doesn't use the "forced" flag at all - what could be tagged as forced is really its own track.
Please don't make suggestions about features you don't fully understand then :P

Forced Only allows Foreign Audio Search to select subtitles that have forced hits, but does not restrict it to selecting only such tracks - if no tracks have any forced subtitles, we fall back on heuristics based on the number of subtitles (otherwise Foreign Audio Search would only work for about 40-50% of discs* - instead of 90%+ currently).

*
Foreign Audio Search does assume it has access to all subtitles from the source, otherwise the heuristics mentioned above would not work, since they need a "full" subtitle track for comparison.

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Woodstock »

Track 7 is the "full" English subtitle track (for use with Japanese audio), 8 is just the forced ones, which is mainly the "third language" in this particular episode. It is fairly typical of Anime titles, in that nothing is ever tagged as forced.

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

Re: "Foreign audio scan" in preset should enable "Forced onl

Post by Rodeo »

Woodstock wrote:Track 7 is the "full" English subtitle track (for use with Japanese audio), 8 is just the forced ones, which is mainly the "third language" in this particular episode. It is fairly typical of Anime titles, in that nothing is ever tagged as forced.
Not only of anime, plenty of "mainstream" titles have that too.

Just to sum up, the only reason Foreign Audio Search will fail for this title is because the proportion of "third language" subtitles vis-à-vis the full subtitle track is too high, and unfortunately there's not much we can do about this.

But if the track 7 had 810 or more subtitles (hits), it would correctly pick track 8 as the correct track, whether "Forced Only" was checked or not.

Post Reply