Discussion: Find and Download Subtitles (2 Viewers)

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    In MP1, DVB subtitle decoding and rendering is handled in the graph (DVB sub filter). SetSubtitleStream() simply selects the PID which is passed to the DVB subs filter. However, teletext subtitle [and page] decoding and overlay is handled in the player. SetSubtitleStream() could select which teletext PID to pass back to the player (most or all channels have 0 or 1 teletext stream, so I don't understand the point)...??? ...but where will the teletext be decoded for rendering?
    I see. Probably we would need a combination of:
    1. Full support of IAMStreamSelect to expose available streams and allow user selection
    2. Output of selected stream types to a subtitle "decode filter"
      1. DvbSub3 to handle also teletext decoding, same way as for DVB. The filter input pin would need to handle more media(sub)types than now
      2. A new filter could be developed (more complicated to handle; additional TsReader output pin, graph building etc..)
      3. (A callback interface in TsReader itself)
    3. Handling of subtitle callbacks from DvbSub3.ax is already implemented in C# side.
    While this is good for all subtitles, I'm not sure about the "teletext page" handling.

    IMO also this decoding could be done by one of the existing filters, which then do callbacks with decoded data to C# side.

    I'm interested in this topic because I was assuming I would need to reimplement teletext page decoding in the TVE 3.5 plugin for MP1, but if the player design changes then I will need to know what to do. Also, I'm wondering if and how you will implement teletext page viewing in MP2...
    I didn't use Teletext on TV sinces years. And in MP1 it also was one of the code parts which lead to many crashes once you used it. Besides that I think it's still useful for some users, so I think MP2 should have support for it as well.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Looks like the 3rd point above is the existing one, I will check how to integrate the ITeletextSource into MP2 TsVideoPlayer...
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Note that you can have Teletext (pages) and DVB Subtitles at the same time - so it could be an and/or situation in theory.

    I'll take a look at the TsReader IAMStreamSelect interface stuff.
     

    MrTechno

    Retired Team Member
  • Premium Supporter
  • February 27, 2011
    1,256
    511
    London
    Home Country
    United Kingdom United Kingdom
    Who still broadcasts teletext? UK stopped about two years ago.
     

    Ministerk

    Super User
  • Team MediaPortal
  • Super User
  • November 28, 2007
    970
    826
    Uppsala
    Home Country
    Sweden Sweden
    Who still broadcasts teletext? UK stopped about two years ago.
    I was curious had to google some statistics: The usage in Sweden is 3 minutes per day and person and hasn't changed since 2001, no earlier data available.
    TV channels/broadcasters with the most viewers uses teletext subtitles and not dvb.
     

    pur_berger

    Super User
  • Team MediaPortal
  • Super User
  • May 14, 2007
    1,679
    309
    52
    Vienna
    Home Country
    Austria Austria
    Can only talk for myself - and I use teletext regulary - special with splitscreen reading news next to ble bla series ;). I don't think it's that dead - and the next gen Teletext doesn't seem to have a chance of being implemented.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    @offbyone I have a question regarding DotNetStreamSource and external subtitles.

    I made a test with graphstudio and compared that with MP2's graph. There is only one difference: the source. But inside graphedit the loading and rendering of external subtitles is working! Inside MP2 it does not.

    I think the subfilter checks the source filter for IFileSourceFilter (or similar) to query the current opened file. I've seen DotNetStreamSource implements this as well. Any idea about the differences and why subs are not loaded in MP2 graph?
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #69
    (Currently on vacation, so a short answer must suffice).

    The DotNetStreamSource filter was build to take a single stream as source without knowing where this comes from (file, network, i-net, .iso, chained resource provider,...). In result this means external subtitle files are not seen by it - it gets a System.IO.Stream.

    What do subtitle filters with the ability for external files in the graph do? They ask the source filter for the full file path and then use their pattern to check for .sub or .srt or so. This is done then with direct file system access by the subtitle filter. When our filter is asked for the source file path - I can't remember what is returned, but most likely null ;)

    If you check page 3 of this thread - you can see that this problem is already "known" - MP2 does not support external subs yet - and we need to think about how to support external files. The xySubFilters interfaces are also on that page - IIRC it has an interface to manually load a subtitle file - this also means we need a way inside MP2 to find those files when something is played, e.g. a C# implementation to request related files for a resource, merge those with the list of embedded subtitle streams and present to the user, so when you select one, we can manually load the file (might need to be mounted via Dokan - but better if we could use a stream here as well to keep away from the Dokan dependency).

    I can't remember if we concluded that this filter breaks dxva. But if we plan to use it, it also has interfaces to get the rendered sub as image so we can mix it in the mp2 UI as overlay? But that's already a new topic.
     

    aspik

    Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    Hi offbyone,

    are they any chances to convince you to add support for external subs? Clearly you know the most about how can it be implemented :) If I could help you in any way, I would, but I don't know how... I could offer to help/take over the task with the integration of SubtitleDownloader, but as you already said, this is the easiest part and firstly MP2 has to be able to "see" and play the subtitles.

    PS: of course after your return from your vacation!! ;)
     

    Users who are viewing this thread

    Top Bottom