MP detects & selects YLE HD audio stream for the visually impaired incorrectly (1 Viewer)

Owlsroost

Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    As I suspect this is an MP player and/or TsReader.ax problem, I'll take a look into it...
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    There are two problems:

    1. TsReader doesn't grab the language for the stream from the PMT. Basically a PMT parsing issue.

    2. Player code doesn't always respect the language preference. That audio stream selection code is... interesting. I completely rewrote it for TVE3.5 because I thought I could do a better job, but I'm not sure how much better I did and I think the change got lost in the merge. You might want to take a look here:
    https://github.com/MediaPortal/Medi...3/TVLibrary/TvPlugin/TvPlugin/TVHome.cs#L2731

    Note that I only messed with the code because of this:
    https://issues.team-mediaportal.com/browse/MP1-2172

    There are also test cases for audio stream selection. Never managed to get them running properly, but I added a test case or two regardless.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Looking at MediaPortal.log:

    Code:
    [2013-07-07 18:19:09,163] [Log	] [MPMain  ] [DEBUG] - TVHome.OnAudioTracksReady()
    [2013-07-07 18:19:09,166] [Log	] [MPMain  ] [DEBUG] - TVHome.GetPreferedAudioStreamIndex(): preferred LANG(s):fin;eng preferAC3:False preferAudioTypeOverLang:True
    [2013-07-07 18:19:09,166] [Log	] [MPMain  ] [DEBUG] - Audio streams avail: 2
    [2013-07-07 18:19:09,166] [Log	] [MPMain  ] [INFO ] - TsReaderPlayer: AudioDualMonoMode switching not available. Audioswitcher filter not loaded
    [2013-07-07 18:19:09,167] [Log	] [MPMain  ] [INFO ] - TsReaderPlayer: AudioDualMonoMode switching not available. Audioswitcher filter not loaded
    [2013-07-07 18:19:09,168] [Log	] [MPMain  ] [DEBUG] - Stream 0 lang UNK, lang priority index -1
    [2013-07-07 18:19:09,168] [Log	] [MPMain  ] [INFO ] - TsReaderPlayer: AudioDualMonoMode switching not available. Audioswitcher filter not loaded
    [2013-07-07 18:19:09,168] [Log	] [MPMain  ] [DEBUG] - Stream 1 lang eng, lang priority index 1
    [2013-07-07 18:19:09,168] [Log	] [MPMain  ] [DEBUG] - Setting AC3 pref
    [2013-07-07 18:19:09,169] [Log	] [MPMain  ] [INFO ] - Audio stream: no preferred stream found - switching to audio stream 0

    ... I think the problem is in the MP player code.

    Can you try unticking the 'Prefer audiotype over Language' box and see if it makes a difference ?

    Also try putting English at the top of the Preferred Language list (just for testing - I assume you have Finnish at the top normally).
     

    Pirppuli

    MP Donator
  • Premium Supporter
  • July 19, 2008
    63
    44
    Helsinki
    Home Country
    Finland Finland
    Looking at MediaPortal.log:
    Can you try unticking the 'Prefer audiotype over Language' box and see if it makes a difference ?

    Also try putting English at the top of the Preferred Language list (just for testing - I assume you have Finnish at the top normally).

    The "Prefer audiotype over language" setting made no difference, nor did the order of the preferred audio languages. However - as indicated in issue MP1-2172 - I was able to make MP player choose anything else but the Unk track by enabling "Prefer AC-3 sound", which was previously disabled. So, I can confirm mm1352000's analysis. Also, it's worth noting that MP1-2172 only covers problem 2 (Player), not 1 (TsReader).
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Can you try the attached TsReader.ax please ?

    I think I've fixed the PMT parsing issue with these AC-3 streams, so you should get the languages identified correctly.

    From the TsReader.log when playing the sample stream:

    Code:
    05-08-2013 11:28:14.015 [ e02e880] [ fc8] New channel found (PAT/PMT/SDT changed)
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  pcr	  pid:  200
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  pmt	  pid:  100
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  video	pid:  200 type: H264
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  audio	pid:  20 language: dut type: AC3
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  audio	pid:  281 language: eng type: AC3
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  Subtitle pid: 178b language: fin type: DVB subtitle 2

    I need you to check it still works correctly with other streams i.e. that it hasn't introduced any regressions with other AC-3 audio.

    We may need to fix the MP audio selection code as well, but we'll do that once we know TsReader.ax is OK.

    Tony
     

    Attachments

    • TsReader_BUG-2172_v72-1.zip
      174.4 KB
    Last edited:

    Pirppuli

    MP Donator
  • Premium Supporter
  • July 19, 2008
    63
    44
    Helsinki
    Home Country
    Finland Finland
    Can you try the attached TsReader.ax please ?

    I think I've fixed the PMT parsing issue with these AC-3 streams, so you should get the languages identified correctly.

    From the TsReader.log when playing the sample stream:

    Code:
    05-08-2013 11:28:14.015 [ e02e880] [ fc8] New channel found (PAT/PMT/SDT changed)
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  pcr	  pid:  200
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  pmt	  pid:  100
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  video	pid:  200 type: H264
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  audio	pid:  20 language: dut type: AC3
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  audio	pid:  281 language: eng type: AC3
    05-08-2013 11:28:14.015 [ e02e880] [ fc8]  Subtitle pid: 178b language: fin type: DVB subtitle 2

    I need you to check it still works correctly with other streams i.e. that it hasn't introduced any regressions with other AC-3 audio.

    We may need to fix the MP audio selection code as well, but we'll do that once we know TsReader.ax is OK.

    Tony

    Unfortunately, YLE HD is the only TV channel with AC3 audio that I have access to. So far, it seems that your changes have fixed the problems I had with audio language detection. I went through a few recordings I had - also from YLE HD - and watched some TV shows with either only Finnish or both Dutch and English audio tracks. They were all detected correctly. I did not see any problems with language detection with MPEG2 audio either. Thank you! :D
     

    Pirppuli

    MP Donator
  • Premium Supporter
  • July 19, 2008
    63
    44
    Helsinki
    Home Country
    Finland Finland
    Unfortunately, YLE HD is the only TV channel with AC3 audio that I have access to. So far, it seems that your changes have fixed the problems I had with audio language detection. I went through a few recordings I had - also from YLE HD - and watched some TV shows with either only Finnish or both Dutch and English audio tracks. They were all detected correctly. I did not see any problems with language detection with MPEG2 audio either. Thank you! :D


    Just a quick follow up: Everything is still working fine. I have not experienced any problems with the new TsReader.ax. Combined with setting "Prefer AC-3 sound" on, audio stream selection now works works perfectly on YLE HD.
     
    Last edited:

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    OK - good :)

    I'll create a new Jira issue for the TsReader.ax bug fix, so the MP player language selection issue doesn't get lost (assuming that there *may* still be a problem there in some situations, as per issue MP1-2172).
     
    Last edited:

    Users who are viewing this thread

    Top Bottom