Only load subtitle when audio isn't the default audio language (1 Viewer)

mhoogenbosch

MP Donator
  • Premium Supporter
  • April 21, 2008
    308
    70
    Utrecht, Netherlands
    Home Country
    Netherlands Netherlands
    I'm looking for a way to only automaticly load subtitles (TV / VIDEO / DVD / enz) only when the audio stream is different than the prefered.

    For example:

    My little minime wants to watch Cars all the time, the prefered audio language is dutch, so there is no sense in loading the default subtitle in dutch.
    For different movies or series whoam have no dutch audio stream the language is in english, then i do want the subtitles loaded.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Have you checked the subtitle option coming with LAVF.

    Subtitles

    There are 4 different modes to be used for subtitle selection.
    Some of the modes will use the preferred languages in a similar way as the audio languages, the syntax for entering them is the same as well.

    “No Subtitles”

    No subtitles will be selected.​
    “Only Forced Subtitles”

    Only subtitles marked as “forced” will be used, taking the preferred subtitle languages into account.​
    “Default”

    The “Default” mode will select subtitles in accordance with the typical interpretation of the Matroska spec. That means that subtitles matching your language preference will be loaded, as well as subtitles marked “default” or “forced”. If none of these factors apply, no subtitles will be loaded.​
    “Advanced”

    The advanced selection mode is the most flexible mode, and allows you to fully control which subtitles get selected. In addition to the rules already used in the other modes, it is also possible to use the audio language to determine which subtitle should be loaded. Example: You want no subtitles with English audio, but you do want subtitles with German audio. This is possible in advanced mode.​
    The advanced mode uses a different syntax for the preferred language field to enable these rules. Instead of a single language tag, a combined tag of audio and subtitle language is required (separated by a colon). The most basic tag would look like this: “ger:eng”. In this case, the interpretation would be “If Audio is German, use English subtitles”.​
    Note: Even though this may feel similar to the selectors Haali’s Media Splitter offers, LAV’s implemention does not allow you to speficy which audio stream is used through the advanced selectors, the audio language is only used to select which subtitles are used.​
    In addition to simply using two language tags, you can use the “*” character to match all languages, or the “off” token to disable subtitles. For example, following tag will enable any subtitles when the audio is english, and disable subtitles otherwise: “eng:*;*:eek:ff”.​
    As you’ve seen in the previous example, multiple rules can be concatenated using a semi-colon (or a space) to build rule chains. Again, everything is interpreted from left to right.​
    To complete the advanced mode, there are a number of flags for “default”, “forced”, “hearing impaired” and “normal” subtitles which are supported. The flags are identified by their first letter, and appended to the subtitle language separated by a pipe character (“|”). As an example, following rule will select any “forced” subtitles, and turn off subtitles otherwise:
    “*:*|f;*:eek:ff”​
    To finish the section about advanced subtitles, here some examples of rules to inspire you:​
    “*:eng;*:*|f;*:*|d”
    This is the rule equal to the “Default” subtitle mode with English as a preferred language.​
    “*:*|n”
    Select all normal subtitles, meaning “not forced, not default and not hearing impaired”​
    “eng:eng|f;ger:ger|f”
    Load English “forced” subtitles if audio is English, load German “forced” subtitles if audio is German, no subs otherwise.​
    “eng:eek:ff;fre:eng;*:*|d”​
    English Audio: Turn subs off; French Audio: English subs; Any other audio: try to find subtitles flagged “default”.
     

    mhoogenbosch

    MP Donator
  • Premium Supporter
  • April 21, 2008
    308
    70
    Utrecht, Netherlands
    Home Country
    Netherlands Netherlands
    Have you checked the subtitle option coming with LAVF.
    “Advanced”


    The advanced selection mode is the most flexible mode, and allows you to fully control which subtitles get selected. In addition to the rules already used in the other modes, it is also possible to use the audio language to determine which subtitle should be loaded. Example: You want no subtitles with English audio, but you do want subtitles with German audio. This is possible in advanced mode.
    This seems exactly what i was looking for :), LAVF you say. Different subtitle engine? When is it coming?
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    It is already available. Just install LAVF package from MP Extension Installer and make sure you use LAV Splitter for your videos.

    To configure open LAV Splitter configuration via windows start menu.
    1.jpg
     

    mhoogenbosch

    MP Donator
  • Premium Supporter
  • April 21, 2008
    308
    70
    Utrecht, Netherlands
    Home Country
    Netherlands Netherlands
    It is already available. Just install LAVF package from MP Extension Installer and make sure you use LAV Splitter for your videos.

    To configure open LAV Splitter configuration via windows start menu.
    View attachment 114636
    oh right, great. I'll do that this afternoon. This is with everything that is beeing split by LAV right? So in MePo itself i have to disable all the subtiles?
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    I think you have to try this on your own. I have not tested this feature. :)
    Maybe someone else could help.
     

    mhoogenbosch

    MP Donator
  • Premium Supporter
  • April 21, 2008
    308
    70
    Utrecht, Netherlands
    Home Country
    Netherlands Netherlands
    I think you have to try this on your own. I have not tested this feature. :)
    Maybe someone else could help.
    would be great if someone could help. When I set the subtitles with the video section to none, it does wat it says it does. I don't have subtitles. When I set the options with the LAV splitter i don't get subtitels... so something must go wrong.

    If anyone could shed some light on this?
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    I think you have to enable subtitle in the video section in MP Config else you won't see any subtitles at all.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    @mhoogenbosch

    I did a quick research and found this:
    In MePo: Choose MPC-HC as subtitle engines and the key point is to choose "Subtitles will be auto loaded by language preference".
    Then my "advanced" settings in LAV Splitter are correctly interpreted, for example I use:
    fr:fr|f, en:fr
    which means that only french forced subtitles will be auto loaded if audio is french,
    and french subtitles will be auto loaded if audio is english.
     

    mhoogenbosch

    MP Donator
  • Premium Supporter
  • April 21, 2008
    308
    70
    Utrecht, Netherlands
    Home Country
    Netherlands Netherlands
    @mhoogenbosch

    I did a quick research and found this:
    In MePo: Choose MPC-HC as subtitle engines and the key point is to choose "Subtitles will be auto loaded by language preference".
    Then my "advanced" settings in LAV Splitter are correctly interpreted, for example I use:
    fr:fr|f, en:fr
    which means that only french forced subtitles will be auto loaded if audio is french,
    and french subtitles will be auto loaded if audio is english.
    right, i'll try that right now ")

    okay, still doesn't work, exact same settings. Probally my string is set wrong.

    Trouble with my subs is i'm dutch, so sometimes its dutch and sometime its netherlands. Tried both now and still doesnt work

    I now have with audio:

    dut,nld

    Subtitles i have:

    Code:
    dut:off;nld:off;nl:off;*:nl

    so when dutch audio (or netherlands) the subs are off. With all the rest its dutch
     
    Last edited:

    Users who are viewing this thread

    Top Bottom