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

Owlsroost

Development Group
  • Team MediaPortal
  • October 28, 2008
    5,539
    5,037
    Cambridge
    United Kingdom United Kingdom
    Country flag
    As I suspect this is an MP player and/or TsReader.ax problem, I'll take a look into it...
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    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

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,539
    5,037
    Cambridge
    United Kingdom United Kingdom
    Country flag
    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
    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

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,539
    5,037
    Cambridge
    United Kingdom United Kingdom
    Country flag
    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

    Last edited:

    Pirppuli

    MP Donator
  • Premium Supporter
  • July 19, 2008
    63
    44
    Helsinki
    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
    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

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,539
    5,037
    Cambridge
    United Kingdom United Kingdom
    Country flag
    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 (Users: 0, Guests: 1)

    Top Bottom