DVB Subtitles shown too early and too short (1 Viewer)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    MediaPortal Version: 1.2.1.0 final
    MediaPortal Skin: DefaultWide
    Windows Version: Windows 7 x64
    CPU Type: AMD Athlon II x2 240e 2.8 GHz 45w TDP
    HDD: OCZ Agility SSD 30 GB
    Memory: 4 GB DDR2 800 MHz Dual-Channel
    Motherboard: Gigabyte GA-MA78GM-S2H (rev 1.0)
    Video Card: Onboard AMD Radeon HD 3200
    Video Card Driver: Catalyst 10.3
    Sound Card: Onboard ALC889A
    Sound Card AC3: optical out
    Sound Card Driver:
    1. TV Card: Terratec Cinergy 2400i DT PCI
    1. TV Card Type: DVB-T
    MPEG2 Video Codec: Microsoft DTV-DVD Video Decoder
    MPEG2 Audio Codec: Microsoft DTV-DVD Audio Decoder
    h.264 Video Codec: Microsoft DTV-DVD Video Decoder
    TV - HTPC Connection: HDMI

    Hi there

    For a long time I have had the feeling that DVB-T subtitles timing in our broadcasts here in Denmark were off, when using MediaPortal. When I compare a broadcast shown on our "normal" Sony DVB-T TV, the subtitle timing is way better than in MediaPortal.

    Generally, my subtitles in MediaPortal are shown a bit too early, and a bit to short. So, they show on screen before people actually talks, and ends before they are done talking. It's a bit annoying when you notice it :)

    I don't see any way of configuring any delay in MediaPortal (the delay controls in the GUI doesn't do anything, right?) so it must be a filter problem.

    There are actually two problems:

    1. Our H.264 broadcasts show subtitles too early and too short
    2. On one of our MPEG2 broadcasts, the subtitles "hangs" until a new set is shown. <-- This is a minor problem.

    The logs I have attached were from when I watched a short part of the movie "I Spy", (H.264, MPEG4) from which I also recorded 4½ minutes in TS-format, that is available for download from: http://cm3.dk/I Spy - DR HD - 2011-10-01.ts

    The recording plays fine in VLC Media Player, when I enable subtitles (DVB Subtitles - [Dansk]) they arrive at perfect timing and stays as long as they should.

    Please ignore the "bad data" or "bad signal" thing in the beginning, my recording hard-drive had to spin up from sleep, so MediaPortal got stuck for a few seconds.

    Hope you can help. I can't really mess with the DVBSub-filter, as it is in C++ and I don't know anything about C++ ;)

    :D
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I don't see any way of configuring any delay in MediaPortal

    There is no need to control the timing since DVB stream contains exact timestamps.

    1. Our H.264 broadcasts show subtitles too early and too short

    I can confirm. I also tested the other samples I have and those are working ok. Just wonder what it could be since no other broadcaster seems to have had any timing issues for many years (the subtitle timing in code has not changed for years...).

    Hope you can help. I can't really mess with the DVBSub-filter, as it is in C++ and I don't know anything about C++ ;)

    If you can code C# then you are able to deubug the subtitle timing in C++. It is only logic and simple plus / minus calculations - nothing language specific :)
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #5
    Try to check how much the subtitles are off and compare it to:

    m_currentTimeCompensation 1.333

    ...it could be TsReader...

    Hmm...I just made a new recording on our HD-channel (DR HD). On this recording the subtitles are off (1.3 sounds about right) but then I found an old recording from the same channel ~ 1 month ago, and here the subtitles are perfectly timed?

    I'll try and upload a sample of this recording as well.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #6
    My (bad) recording today has the same or larger compensation:

    Code:
    08-10-2011 18:48:38.327 [8b0]DVBsubs: END OF INPUT PES DATA.
    08-10-2011 18:48:39.033 [8b0]New subtitle ready - subtitle cache count = 1
    08-10-2011 18:48:39.034 [8b0]DVBsubs: call NotifySubtitle()
    08-10-2011 18:48:39.034 [8b0]Subtitle arrived - media position 0:00:12.052
    08-10-2011 18:48:39.034 [8b0]subtitlePTS                0:00:14.194
    08-10-2011 18:48:39.034 [8b0]m_basePCR                  0:00:00.000
    08-10-2011 18:48:39.034 [8b0]timestamp                  0:00:12.426
    08-10-2011 18:48:39.035 [8b0]m_CurrentSeekPosition      0:00:00.000
    08-10-2011 18:48:39.035 [8b0]m_currentTimeCompensation  1.768
    08-10-2011 18:48:39.035 [8b0]Bitmap: bpp=32, planes=1, dim=720 x 122
    08-10-2011 18:48:39.035 [8b0]TIMEOUT  : 6
    08-10-2011 18:48:39.035 [8b0]TIMESTAMP: 12426
    08-10-2011 18:48:39.035 [8b0]Calling subtitle callback
    08-10-2011 18:48:39.040 [8b0]Subtitle Callback returned
    08-10-2011 18:48:39.040 [8b0]DiscardOldestSubtitle
    08-10-2011 18:48:39.041 [8b0]DVBsubs: END OF INPUT PES DATA.
    08-10-2011 18:48:43.905 [8b0]DVBsubs: page_time_out was 1 , forcing it to 6 seconds
    08-10-2011 18:48:43.905 [8b0]DVBsubs: call UpdateSubtitleTimeout()
    08-10-2011 18:48:43.906 [8b0]Calling update timeout observer - timeout = 5145 ms
    08-10-2011 18:48:43.906 [8b0]DVBsubs: END OF INPUT PES DATA.
    08-10-2011 18:48:44.165 [8b0]New subtitle ready - subtitle cache count = 1
    08-10-2011 18:48:44.165 [8b0]DVBsubs: call NotifySubtitle()
    08-10-2011 18:48:44.165 [8b0]Subtitle arrived - media position 0:00:17.183
    08-10-2011 18:48:44.166 [8b0]subtitlePTS                0:00:19.476
    08-10-2011 18:48:44.166 [8b0]m_basePCR                  0:00:00.000
    08-10-2011 18:48:44.166 [8b0]timestamp                  0:00:17.708
    08-10-2011 18:48:44.166 [8b0]m_CurrentSeekPosition      0:00:00.000
    08-10-2011 18:48:44.166 [8b0]m_currentTimeCompensation  1.768
    08-10-2011 18:48:44.167 [8b0]Bitmap: bpp=32, planes=1, dim=720 x 122
    08-10-2011 18:48:44.167 [8b0]TIMEOUT  : 4
    08-10-2011 18:48:44.167 [8b0]TIMESTAMP: 17708
    08-10-2011 18:48:44.167 [8b0]Calling subtitle callback
    08-10-2011 18:48:44.171 [8b0]Subtitle Callback returned
    08-10-2011 18:48:44.171 [8b0]DiscardOldestSubtitle
    08-10-2011 18:48:44.172 [8b0]DVBsubs: END OF INPUT PES DATA.

    But the old (good) recording has even larger compensation, so it may not be the compensation I'm to blame:

    Code:
    08-10-2011 19:37:08.664 [370]DVBsubs: call NotifySubtitle()
    08-10-2011 19:37:08.664 [370]Subtitle arrived - media position 0:11:39.562
    08-10-2011 19:37:08.664 [370]subtitlePTS                0:11:45.470
    08-10-2011 19:37:08.664 [370]m_basePCR                  0:00:00.000
    08-10-2011 19:37:08.665 [370]timestamp                  0:11:43.430
    08-10-2011 19:37:08.665 [370]m_CurrentSeekPosition      0:00:00.000
    08-10-2011 19:37:08.665 [370]m_currentTimeCompensation  2.040
    08-10-2011 19:37:08.665 [370]Bitmap: bpp=32, planes=1, dim=720 x 122
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #7
    Right, I have uploaded two files, one that works and one that doesn't. I must point out that they both work in VLC with correct timing!

    Working: http://cm3.dk/Imposter 60 MB.ts
    Not working: http://cm3.dk/Echelon Conspiracy 60 MB.ts

    They are both 60 MBs and both contains DVB-subtitles and Teletext-subtitles. They are both recorded on the same channel (DR HD) and on the same TV-tuner etc.

    Hope this can shed a light on the differences...

    ;)
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #8
    I tried compiling the filter myself, I opened the project Release 1.2.x\DirectShowFilters\DVBSubtitle2 in Visual Studio 2010 and tried to just build the MP_DVB_Subtitles filter. That didn't go well:

    Code:
    Error	1	error C3852: '_AMOVIESETUP_FILTER::filterCategory' having type 'const CLSID': aggregate initialization could not initialize this member	D:\MP Dev\Release 1.2.x\DirectShowFilters\DVBSubtitle2\source\dllmain.cpp	63	1	MP_DVB_Subtitles
    Error	2	error C2512: '_AMOVIESETUP_FILTER::_AMOVIESETUP_FILTER' : no appropriate default constructor available	D:\MP Dev\Release 1.2.x\DirectShowFilters\DVBSubtitle2\source\dllmain.cpp	63	1	MP_DVB_Subtitles
    Error	3	error C2078: too many initializers	D:\MP Dev\Release 1.2.x\DirectShowFilters\DVBSubtitle2\source\dllmain.cpp	63	1	MP_DVB_Subtitles

    Line 63 (the line in the three errors) is this part:

    Code:
    const AMOVIESETUP_FILTER FilterInfo =
    {
      &CLSID_DVBSub2,            // Filter CLSID
      L"MediaPortal DVBSub2",    // String name
      MERIT_DO_NOT_USE,          // Filter merit
      1,                         // Number pins
      sudPins                    // Pin details
    };

    Building the entire solution gives me heaps of errors. How come? I updated the entire MediaPortal project to the latest available on SVN (I know Github is the future) and MediaPortal itself builds just like it should. So does TV-Server.

    What I would REALLY like to do, is to change the "SetTimeCompensation" value in DVBSub.cpp and see if this has any effect.

    Can others compile the DirectShow filters? Cause I can't :(
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Did you setup the enviroment like it is described in DirectShowFilters\VS Environment Setup.txt ?

    DvbCoreUtils project needs to be compiled as well.

    Changing SetTimeCompensation value would move the subtitles, but it wont solve the actual issue at all.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #10
    I'm currently downloading and installing both DirectX SDK and Windows SDK. What a time-killer... but thanks for the "read the descriptive txt" heads up ;) Should have done that!

    I know it won't solve the problem, but I hope to find out if the actual timing changes anything.
     

    Users who are viewing this thread

    Top Bottom