Skip to content

Audio Track Dependent Subtitle Defaults #323

Open

Description

@Haravikk

This enhancement proposal is to enable configurable default subtitles that are dependent upon the audio track matched by the audio defaults.

The idea is to enable Handbrake to automatically select subtitles if none of the desired audio languages is found. For example, if my audio default is English, but I encode an anime series with only Japanese audio, then Handbrake could automatically select English subtitles (if available), however for a series with English audio it would skip subtitles entirely.

In terms of interface, I could see this being added to the Configure Defaults window for subtitles; from here it would be possible to select from among the configured audio defaults and specify which ones should/should not include subtitles, with a default option for all other languages. But this may be complex, so any simpler solution may be fine too.

Basically for my own personal use case my default is to only include English audio (where available), in which case I don't need subtitles, but when that audio is unavailable I would like to have English subtitles included automatically.

If automating this is too complex, then my other issue #324 may cover this use-case well enough that it's not a problem. Hopefully a developer can comment on what implementing this would look like so that can be decided.

Activity

  1. jstebbins commented on Sep 13, 2016

    @jstebbins
    Contributor

    I'm not sure if the other GUIs ever implemented the UI elements for this. But there is a preset key already for this use case (SubtitleAddForeignAudioSubtitle TRUE/FALSE). What this key enables is pretty much what you've described. If the first audio track language does not match the preferred subtitle language (as defined by the first language in the subtitle language list), then the first subtitle track with the preferred subtitle language is added.

    The Linux GUI has a checkbox that enables this preset key in the subtitle defaults pane. The checkbox is labeled "Add XXX subtitle track if default audio is not XXX" where XXX is replaced by the preferred subtitle language. The checkbox is disabled when the preferred subtitle language is not set.

    I use this in all my personal presets along with the foreign audio search option in order to get the necessary subtitles in my encodes.

  2. Haravikk commented on Sep 13, 2016

    @Haravikk
    Author

    Ah, didn't realise that! It doesn't look like it's in the Mac GUI (or if it is I can't find it), in that case perhaps this issue should be considered a request to make sure it is added to all platforms?

    In the mean time I'll try adding the option to my presets manually, thanks!

  3. bradleysepos commented on Sep 13, 2016

    @bradleysepos
    Contributor

    @galad87 @sr55 Perhaps this is something to look at for 1.1.0?

  4. sr55 commented on Sep 13, 2016

    @sr55
    Contributor

    I suppose but it's kind of awkward.

    It's only relevant if selection behaviour = none. Otherwise it'll get added anyway.
    It probably makes sens to grey out the checkbox and disable it on the linux GUI when First/All is selected.

  5. added this to the 1.1.0 milestone on Sep 13, 2016
  6. bradleysepos commented on Sep 13, 2016

    @bradleysepos
    Contributor

    I would think it would only be irrelevant if the selection behavior doesn't already match the subtitle this would add? Perhaps @jstebbins can clarify how this works in the GTK GUI.

  7. sr55 commented on Sep 13, 2016

    @sr55
    Contributor

    Subtitle selection is either First or All for any of the selected languages.

    This feature relies on the first selected language. So, both first and all will add atleast one track of that language if it exsts on the source.

  8. bradleysepos commented on Sep 13, 2016

    @bradleysepos
    Contributor

    Ah, I misread this:

    The checkbox is labeled "Add XXX subtitle track if default audio is not XXX" where XXX is replaced by the preferred subtitle language. The checkbox is disabled when the preferred subtitle language is not set.

    👓 👀

  9. jstebbins commented on Sep 14, 2016

    @jstebbins
    Contributor

    @sr55 good point. In my mind this feature was more like foreign audio scan from a users perspective, and it didn't occur to me that functionally, it's really more of a selection behaviour. It could easily be made into an option in the selection behaviour dropdown and the extra SubtitleAddForeignAudioSubtitle key can be eliminated. If you all prefer this from a UI perspective, I don't mind making this change.

  10. bradleysepos commented on Sep 14, 2016

    @bradleysepos
    Contributor

    So, something like "First Matching Selected Languages, only when default audio differs"?

  11. sr55 commented on Sep 15, 2016

    @sr55
    Contributor

    Indeed. But maybe shorter since that's awkward for a dropdown :)

  12. 3 remaining items

  13. bradleysepos commented on Sep 16, 2016

    @bradleysepos
    Contributor

    Seems like it would be good to echo (plaintext) the preferred audio language in the subtitles defaults dialog.

    Preferred audio language: English

    And then make the behavior option something like:

    Preferred Audio Language Fallback

    Fallback could be in parens. Tooltip (and docs) could explain further. Thoughts?

  14. jstebbins commented on Sep 16, 2016

    @jstebbins
    Contributor

    There really is not concept of preferred audio language in the UI. We chose to make the "preferred language" the first language in the subtitle list. But the first language in the audio list has no special meaning. An in fact, the way I use the defaults is I always set the first audio language to Unknown (Unknown actually means Any) and the second to English. So a foreign film always has the native audio first, followed by any english dub track it might have. Then in subtitle defaults, I have English as the first (and therefore preferred) language.

    There is a UI bug there that I just noticed. It used to say "Any" instead of "Unknown" but when I switched to using libhb language list from a private list that was in the LinGui, I forgot to fix that.

  15. bradleysepos commented on Sep 16, 2016

    @bradleysepos
    Contributor

    Perhaps I continue to misunderstand, sorry about that. After your previous comments, I was thinking preferred audio language is synonymous with the native language preference in MacGUI. Not so?

    I'll take a closer look at LinGUI to see what else I may be missing.

  16. jstebbins commented on Sep 16, 2016

    @jstebbins
    Contributor

    I'm not sure what the mac ui does with the native language preference, but it is an old concept that should have been superseded by the preset based subtitle and audio default settings. The linux gui dropped that preference option entirely because it conflicts with the preset options. The lingui also used to have preference options for whether to select an audio dub track for the first audio or to add a subtitle track matching the preferred language. This is all more flexibly handled by the preset audio and subtitle defaults now.

  17. sr55 commented on Sep 16, 2016

    @sr55
    Contributor

    The WinGui Also just has the language list now.

    Either way, we should keep it simple. Regardless, we are some ways away from implementing this so no rush to decide :)

  18. bradleysepos commented on Sep 16, 2016

    @bradleysepos
    Contributor

    At first glance, it appears that the native language preference is used in conjunction (English is explicitly checked for me in the audio defaults, using the default official preset).

    So, is the default behavior in other GUIs to use "Any" language unless a custom preset is created? It would seem the global native language preference is actually a win, here. That said, I'm setting a personal record for misunderstanding things in this thread, so... 😹

  19. jstebbins commented on Sep 16, 2016

    @jstebbins
    Contributor

    Yes, we lost the ability to set a preferred language in built-in presets. But the logic and UI confusion resulting from having both seemed to justify this.

  20. removed this from the 1.1.0 milestone on May 29, 2017
  21. added this to the 1.2.0 milestone on Jun 14, 2017
  22. modified the milestones: 1.2.0, 1.3.0 on Oct 3, 2018
  23. modified the milestones: 1.3.0, Unscheduled on Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions