Discussion: Find and Download Subtitles (1 Viewer)

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    I'm missing the functionality to search subtitles for a movie or tv series in MP2.

    In MP1 there is SubCentral which uses the SubtitleDownloader library. When you select a menu entry "subtitles", a new window shows where subs for the previously selected item are searched. You can then select a result and save it next to the file, so when playing it now shows those subs.

    How can we easily incorporate this in MP2?
    As a start I suggest we make a NuGet package for the SubtitleDownloader dll.
    Then we need to be able to invoke a search from within the GUI and select a result. How could we best solve this for MP2? Do we include this functionality into the core or make a plugin for it? Can the plugin extend the menu for specific MediaItems (Tv Serie Episode, Movie)?

    There's not much to code, because most is already solved with the SubtitleDownloader (thx to @seco), all we need to make it work in MP2 are a few configuration options, new menu entries, and a new dialog to select results. But the added benefit would be great imho. I am willing to do the coding, if we can agree on the best course to take ;)
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    I don't use any subtitles - but I'm a big fan of the plugin solution. That's what our plugin system is for :D
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I think we should add an extension interface for player menu (like we did for program actions in tv).
    There we could place into all actions, downloading subtitles could be one of them. But it's only one part. The other would be to extend video player with proper support for subtitles and we probably even need to rebuild graph once subs get available.
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #4
    Whoops, I didn't even realize MP2 does not support subtitles yet :( This mean we have to take on step back and start with support for displaying subtitles! I think many people use or are forced to use subtitles because their countries do not synchronize (or do it badly).
    (e.g. I watch all English movies in English with english subs to read the words when I don't understand their slang)

    @morpheus_xx : Is there any code in MP2 already present that concerns subtitles or are we at step 0?
    @Sebastiii : IIRC you worked on subtitles in MP1. Can you summarize for me what MP1 does to display subtitles? What dshow filters are involved? How and What displays (or mixes?) the subs into the players image?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    We already support subtitles for different sources:
    • DirectShow decoder filters that support subtitles (ffdshow), using the IAMStreamSelect interface
    • DVD subtitles
    • DVB subtitles for TV/Recordings
    • Auto-loading DirectShow filters that provide IAMStreamSelect interface (like DirectVobSub)
    What we don't support is manuall adding of DirectShow filters into graph or manual rendering of subtitles into video frame (except the list above)
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #6
    DirectShow decoder filters that support subtitles (ffdshow), using the IAMStreamSelect interface

    Am I right in the assumption that this only works because ffdshow filter itself will render the subs into the picture?
    Because I just tried a mkv with embedded subtitles (splitter is LAV) and I can select the subtitle streams, but see nothing in the picture.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Whoops, I didn't even realize MP2 does not support subtitles yet :( This mean we have to take on step back and start with support for displaying subtitles! I think many people use or are forced to use subtitles because their countries do not synchronize (or do it badly).
    (e.g. I watch all English movies in English with english subs to read the words when I don't understand their slang)

    @morpheus_xx : Is there any code in MP2 already present that concerns subtitles or are we at step 0?
    @Sebastiii : IIRC you worked on subtitles in MP1. Can you summarize for me what MP1 does to display subtitles? What dshow filters are involved? How and What displays (or mixes?) the subs into the players image?

    Hi :)

    Yep MP1 handle ffdshow / directvobsub and mpc-hc engine but it could be nice if MP2 can use light and better version 'xy-VSFilter Project (High Performance VSFilter Compatible Subtitle Filters)' :
    http://forum.doom9.org/showthread.php?t=168282

    The most of the work for mpc-hc engine sub was done from @cpp2005 :) I only update source against recent version but it seems that subtitle are added over the EVR renderer or over the video decoder. In fact i'm not really an expert lol
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Good idea. I don't want to include foreign source codes into MP2 repository, so NuGet is preferred
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #10
    Alright:
    NuGet Package created and added to our feed.
    Now simply loading the filter from dll and adding it to the graph before rendering all pins already shows subtitles embedded in mkv in MP2 :)

    I guess now we have to find a good place where to add the code that adds the subtitle filter.
    Currently I chose: to override AddSourceFilter in theVideoPlayer and first add the subtitle filter then call the base implementation.
     

    Users who are viewing this thread

    Top Bottom