Live/Timeshift works, Recording doesn't. Issue with PMT PID (1 Viewer)

meq123

Portal Pro
February 1, 2008
51
1
Home Country
United States of America United States of America
MediaPortal Version: 1.1.3
MediaPortal Skin: BW
Windows Version: XP Pro
1. TV Card: Various/HDHomerun (ATSC-Clear QAM)

I've used MediaPortal for a couple of years, but mostly for viewing video files. Recently I've been forced to move to it for ATSC Clear-QAM recording and live TV, so I did a fresh install (from OS up) of MP 1.1.3 and For The Record 1.6. I got everything working EXCEPT that although I can watch and timeshift Live TV to my heart's content, I cannot record anything! Looking at the TV-Server logs I see that when timeshifting, it locks on to the channel fine, but when trying to record (either via FTR or manually from TV-Server config) I see the dreaded entries:
card: WaitForRecordingFile - waiting _eventAudio & _eventVideo
card: WaitForRecordingFile - no audio was found after 15 seconds​

Now a little more background. My service provider is Comcast in the US, and they still have a number of channels in clear-QAM. Trouble is they move them around constantly and even without that it's very difficult to first logically map the channels to guide data and THEN you have to go manually associate everything in MP and FTR. Pain. So I wrote a program (in DOS batch, no less) that takes the scan file from HDHomerun (Digital Channel.xml) and a MC2XML EPG file and merges the two to form an MP-importable channel file that contains all the channel data, named in a way that is human-readable in the guide and that matches the channel numbering in the EPG. Thus, rather than using TV-Server to scan for channels and getting a bunch of "Unknown_XXXX" channels which I'd have to manually map, I can just run my program and import the channel list, which will link and match the EPG. So far so good... but I finally realised that this was the root of the above problem. I was able to gather all the data I needed from the HDHR scan files EXCEPT the PMT PID. I just defaulted that to 0 and that works fine for timeshift/Live, but apparently fails miserably for Record. WHY is that?? I verified it was the cause by manually finding the PMT PID for a couple of channels and entered the values via TV-Server config, and sure enough, those channels will now record.

So why/how can TS-Server find the PID on it's own when tuning to a live channel, yet absolutely require it to be present in the channel data (in advance) when recording? It doesn't makes sense.

I'm not sure if this is a "bug" or a feature lack, or what. But maybe there's a workaround that someone can point me to? Or even a way of finding the PMT PID from HDHomerun? Right now the only way around it I can see is go back to manually finding and entering them again, which defeats the whole purpose of my fancy import-channel.xml creator.

Help?
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi meq123

    Sounds like you've had a bit of a torrid time getting MP working - I apologise. :sorry:
    Firstly, the reason why setting the PMT PID to 0 will work for timeshifting is that you've actually unwittingly turned on a debug feature that makes TV Server lookup the PMT PID in the PAT automatically each time you tune. Using the actual PMT PID is recommended because it should result in slightly faster channel changing, however some providers change the PMT PID occasionally so the debug feature does have its use.

    So that explains that part of the equation. The recording part is a mystery to me. Off the top of my head (I'm at work so I can't check) I would have thought that the same code path is used for tuning when recording as for tuning when timeshifting. I may be able to guess what is going on if you could post some TV Server logs of failed attempts to record. Otherwise, I'll have a look at the code when I get home in 2-3 hours...

    mm
     

    meq123

    Portal Pro
    February 1, 2008
    51
    1
    Home Country
    United States of America United States of America
    Sounds like you've had a bit of a torrid time getting MP working - I apologise.

    PLEASE don't apologise - I'm constantly amazed by the innate 'goodness' of MediaPortal. The torridness is no fault of yours, more the arbitrary attitude and internal confusion of the Service Provider(s) :)

    So that explains that part of the equation. The recording part is a mystery to me. Off the top of my head (I'm at work so I can't check) I would have thought that the same code path is used for tuning when recording as for tuning when timeshifting. I may be able to guess what is going on if you could post some TV Server logs of failed attempts to record. Otherwise, I'll have a look at the code when I get home in 2-3 hours...

    Thank you for the explanation and efforts. Attached is part of the TV.log around a successful timeshift tune, followed by failed record to the same channel as performed manually from TV-Server config. Hope it helps (though there's not a lot there). Thanks!
     

    Attachments

    • TV_Log_extract.txt
      8.5 KB

    meq123

    Portal Pro
    February 1, 2008
    51
    1
    Home Country
    United States of America United States of America
    Now, just for completeness and in case it helps, attached is the similar part of the TV.log file for a successful manual timeshift AND successful record -- for one of the channels where I manually entered the PMT PID. Thanks again
     

    Attachments

    • TV_Log_extract-wkg.txt
      9.4 KB

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi again meq123

    Thanks for the logs. :D
    This issue really had me baffled. I couldn't figure out how you were testing let alone reproduce the problem... but I eventually figured it out. It was not enough to set the PMT PID on a channel to zero. I actually had to turn on the debug option that I mentioned earlier. The reason for that must be a small behaviour difference between 1.1.3 and 1.2.0b (which is what I'm using): with 1.2.0b, the PMT PID in the database is automatically updated. In any case, once I was able to reproduce, I quickly found and fixed the problem. According to your first post you're using 1.1.3 so I've built a binary for you to use.

    Installation instructions:
    1. Stop TV Server.
    2. Take a backup of the TVLibrary.dll in your TV Server install folder.
    3. Download and extract the attached TVLibrary.dll into your TV Server install folder.
    4. Start TV Server.

    You *should* be good to go after that... but let me know if it still doesn't work. Assuming the fix is effective, I'll ensure the issue is fixed in 1.2.0.

    mm
    :)
     

    Attachments

    • TVLibrary[1.1.3_PMT_fix].zip
      150.9 KB

    meq123

    Portal Pro
    February 1, 2008
    51
    1
    Home Country
    United States of America United States of America
    As they say in the vernacular... "You Da Man!"

    THANK you! This seems to have done the trick and I can now record any channel. Woo hoo!

    Now, I did have a small problem in that when I brought up MP, I could no longer view SD channels even though HD channels work OK. They would apparently tune, but I'd get black screen. I exited, tested in TV-Server config 'preview' and they worked OK, so then went back to MP and they were now working! Beats me, maybe just one of those things. I'll let you know if it reoccurs.

    Meanwhile, thank you SOOOO much for the patch and the extremely quick turnaround!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    THANK you! This seems to have done the trick and I can now record any channel. Woo hoo!
    No problem - glad to be of service. :D

    Now, I did have a small problem in that when I brought up MP, I could no longer view SD channels even though HD channels work OK. They would apparently tune, but I'd get black screen. I exited, tested in TV-Server config 'preview' and they worked OK, so then went back to MP and they were now working! Beats me, maybe just one of those things. I'll let you know if it reoccurs.
    Sounds like a potential codec issue to me. Just make sure you've set up your codec preferences in MP configuration ("codecs and renderer" section, "TV codecs" tab).

    mm
     

    Users who are viewing this thread

    Top Bottom