DVB-C radio not working | Page 6

Discussion in '1.3.x' started by torrinha, April 10, 2013.

  1. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,503
    Likes Received:
    2,774
    Location:
    Cambridge
    Ratings:
    +4,057 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Is this a TVE3 compatible TsWriter (not TVE3.5) ? - if so, I'll drop into my test system.

    I'll take a look (but it might not have time today). Can you attach the TsWriter and TsReader logs please ?

    (the 'demux: Alert: Wait for Media change cancelled on 5 secs timeout' message basically means TsReader has found that something in the stream has changed which may require a graph rebuild - due to the channel change e.g. different audio format, video format or frame size - but it's waiting for a response from MP player and it's not happened, possibly because MP thinks it's not necessary. Maybe there is a mis-match between what's in the PAT/PMT and the video/audio streams themselves ? Need the logs to tell you more)

    Tony


     
    Last edited: March 24, 2014
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,897
    Likes Received:
    708
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +1,222 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    @mm1352000 unfortunately, I changed my cable provider. :( And aldo I think they probably fix it.
    Maybe we ca somehow vanish PCR from stream to check your patch or broadcaast my file with vlc to tv server or smth :)
     
  4. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,498
    Likes Received:
    4,712
    Ratings:
    +8,175 / 17
    Home Country:
    New Zealand New Zealand
    Yes, TVE 3 compatible. I transplanted the DiskRecorder and PMT parser classes.

    Full logs attached.
    Started with Choice TV - seemed a little slow to start given I preload my tuner.
    However the change from Choice to TV 3 (HD) was much slower. For a period of time I saw black screen, presumably while TV Server was changing channel. Then I saw a frozen image of Choice TV for a couple of seconds, then finally TV 3 kicked in.
    You can see an unusual delay here:
    Hmmm, there shouldn't be a mismatch, but I'll investigate that avenue of enquiry to make sure. Thanks for the tip. :)
     
  5. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,498
    Likes Received:
    4,712
    Ratings:
    +8,175 / 17
    Home Country:
    New Zealand New Zealand
    Hmmmm, okay. Oh well! :)
    I do still have the old dump you provided which seems to work now. So I was fairly confident that the code works, just wanted to double check.

    Yep, maybe. I'll see if I can do that. :)
     
    • Like Like x 1
    • Agree Agree x 1
  6. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,503
    Likes Received:
    2,774
    Location:
    Cambridge
    Ratings:
    +4,057 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Looking at the TsReader log:

    Code (Text):
    1. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] - New channel found (PAT/PMT/SDT changed)
    2. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] -  pcr      pid:   30
    3. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] -  pmt      pid:   20
    4. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] -  video    pid:   30 type: H264
    5. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] -  audio    pid:   40 language: eng type: LATM AAC
    6. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] -  audio    pid:   41 language: eng type: AC3
    7. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] -  Subtitle pid:   50 language: eng type: DVB subtitle 2
    8. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] - Setting initial audio index to : 0
    9. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] - DeMultiplexer: We have a video stream, so we let the mpegParser check/trigger format changes
    10. [2014-03-25 09:53:44,515] [ 87d0048] [ 9ac] - demux:Wait for media format change:1
    11.  
    ........
    Code (Text):
    1. [2014-03-25 09:53:44,625] [ 87d0048] [ 254] - demux:Wait for Audio stream selection :0
    2. [2014-03-25 09:53:49,531] [ 87d0048] [ 678] - demux: Alert: Wait for Media change cancelled on 5 secs timeout
    3. [2014-03-25 09:53:53,296] [ 87d0048] [ 9ac] - DeMultiplexer: First Gop after new PAT, 1920x1080 @ 16:9, 25.000Hz interlaced
    4. [2014-03-25 09:53:53,296] [ 87d0048] [ 9ac] -   H.264 I-FRAME found 24.624000
    5. [2014-03-25 09:53:53,296] [ 87d0048] [ 9ac] - DeMultiplexer: triggering OnVideoFormatChanged
    6.  
    ...it's taking nearly 9 sec from the point that the PAT is changed to it finding the first GOP (hence the 'Media change' timeout - could anything be delaying the video/audio TS packets being written to the file (or are their PIDs wrong for a while, so they get discarded in TsReader) ?
     
  7. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,498
    Likes Received:
    4,712
    Ratings:
    +8,175 / 17
    Home Country:
    New Zealand New Zealand
    There is indeed a sequence of events required to start writing to file, and it is a bit complex. In general the principles are:
    • don't write to file at all if all video and audio is encrypted
    • don't write to file at all until PCR is received (or in the now-supported case: until we determine that PCR is not available and start generating PCR from PTS, which requires a PES header containing PTS from an audio PID)
    • don't write a given PID to file until a TS packet with the payload unit start flag set is received... with the exception of the PCR PID (or audio PID that we're using to generate PCR), for which we will write any packet as soon as PCR is received or generated
    The goal is to deliver TsReader a timestamp for sync and a clean entry point on each PID (hence the complex third requirement) right up front. In the third condition the exception for the PCR stream is to avoid creating a discontinuity, because the packet carrying PCR is not necessarily also going to be the start of a PES packet.

    From a file perspective, the PAT will be the first packet written to the file; the second will be the PMT; the third will be a packet containing PCR which may or may not contain the start of a PES packet. Following that will be all packets from the PCR source PID... and the packets from the other PIDs will appear as soon as we see a payload unit start flag.

    I'm not sure whether any or all of these conditions are necessary but they basically mirror what was in the code already. It should not take 9 seconds for this sequence to complete. In fact, you can see it happens extremely quickly in this example:
    Video/audio is seen, quickly followed by PCR. Since the PCR is carried in the video PID TsWriter will be writing the video stream to disk from that point forward (hence the relatively quick ramp on the throttle). We don't write the audio content until the "start of audio" entries which correspond with the payload unit start flag being seen on those PIDs, but even that is nowhere near 9 seconds later. Obviously this doesn't correspond to GOPs... but TsWriter doesn't do that level of analysis.
     
  8. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,498
    Likes Received:
    4,712
    Ratings:
    +8,175 / 17
    Home Country:
    New Zealand New Zealand
    Ahhh, problem solved. :)
    I needed to bump the PAT version on channel change. If what I was seeing is representative of what happens when PMT changes (ie. a dynamic PMT change without channel change)... it seems not very... optimised.

    [edit: Updated version attached for anybody who would like to test. Definitely compatible with MP 1.6 PR and newer. Probably compatible with older versions too.]
     

    Attached Files:

    Last edited: March 25, 2014
  9. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,204
    Likes Received:
    6,169
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,150 / 9
    Home Country:
    France France
    Show System Specs
    Will try this version too for regression :)
    You know that i have some IPTV channel where PMT change in live (from start of tuning channel), for my IPTV provider, we think that it stream from different server.
    I need to try that even if it will not work as before, i can test the regression lol
     
  10. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,204
    Likes Received:
    6,169
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,150 / 9
    Home Country:
    France France
    Show System Specs
    Hi :)

    Not sure is usefull and maybe something on my side, i have see just try and 'No PMT found' appear twice and i try to tune other channel and was ok after.
    :)
     

    Attached Files:

    • TsWriter.zip
      File size:
      77.1 KB
      Uploaded:
      March 25, 2014
      Views:
      110
  11. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,204
    Likes Received:
    6,169
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,150 / 9
    Home Country:
    France France
    Show System Specs
    Here a new one :
    V1 : PMT not Found
    V2 : PMT not Found
    V3 : PMT Found

    @georgius too :)
     

    Attached Files:

Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!