Hauppauge HD-PVR & Colossus Support (3 Viewers)

Klairic

Portal Member
May 15, 2011
10
4
Home Country
Canada Canada
Hi guys, I got a Colossus a few days ago, and I'm having some problems.

For the most part, I got everything figured out. Then I realized I can send an unencrypted HDMI signal from my STB (Cogeco in Ontario).

So, I can get the Hauppauge and Arcsoft software to play the HDMI signal, but I can't get Media Portal to. Any ideas on which video/audio signal I should be setting the channels to? I've tried them all, but my methodology for testing could be wrong.

I'm open to posting logs and going through the source to try and figure things out, but I'm not sure where to start. Also, I thought this might have a simple answer.

Let me know if I can help.
 

mm1352000

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

    WileECoyote: my thanks to you once again for the time and effort you have invested! :D

    Thanks to your logs I can see exactly what the problem is. The issue is on the TV Server side. When you change channels, the Colossus crossbar currently only gets re-setup when the channel that you change to uses a different *video* input to the one that you were previously viewing. The audio input is ignored. I find this kinda interesting because I didn't go anywhere near that code with my refactoring when we added Colossus support. In other words, this issue might also affect the HDPVR, and its possibly been around since support for the HDPVR was first added...

    As for the "auto" selection: that choice is completely unhandled in the HDPVR/Colossus code (it *is* handled for regular analog tuners though). On tuning a channel with the "auto" audio input TV Server simply doesn't change the audio selection, which is probably why your choices in the Arcsoft software have had a bearing on TV Server. :(

    In the light of that information, I've put together a debug DLL for y'all to try. It should ensure that the crossbar is set up appropriately at all times, including when "auto" is selected. Please note that if a video pin has multiple related audio pins then the "auto" preference may not be deterministic; alternatively it may select the wrong audio input. It is always better to specify the audio input as I've previously recommended...

    Instructions for use:
    1. Stop the TV Server service.
    2. Make 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 service.
    5. Test :D.

    mm
     

    Attachments

    • TVLibrary(v1)[1.2.0b_Colossus_HDPVR_audio_input].zip
      159.5 KB

    kilik360

    MP Donator
  • Premium Supporter
  • September 3, 2010
    576
    235
    Home Country
    Canada Canada
    Hi mm, I'll be short. That did the trick for me ! Thanks a lot !
    I'll do more testing and post back if i got problems.
     

    WileECoyote

    MP Donator
  • Premium Supporter
  • October 14, 2008
    1,156
    220
    Cary, NC
    Home Country
    United States of America United States of America
    @mm,
    Hmmm, still not working for me (see attached logs). I tried to set the channels to auto, but nothing worked so I switched them all back to use SPDIF #2. Same results as before, the first channel started (either DD or non-DD) works fine, but when changing to the opposite the audio stops working.

    Thanks mm. Im sure you will find it quickly!
    Wile E.
     

    Attachments

    • ESPN - ESPN U.zip
      4.6 KB

    WileECoyote

    MP Donator
  • Premium Supporter
  • October 14, 2008
    1,156
    220
    Cary, NC
    Home Country
    United States of America United States of America
    @mm,
    I have been playing more and tried several settings/setups with the STB. I have tried DD Only and Dolby Digital & PCM but both produce the same results as above. I unplugged the RCA Line #1 as well, but I dont think the issue is with selection of the input, its with detecting/selecting the right codec.

    I also tried changing the "Prefer AC3 Audio" in the MP Config and it didnt seem to change anything either.

    I agree with your thoughts, I think this has been an issue since the original HD-PVR. SJeffrey and I have been trying to get someone to look at the "Stutter after channel change when DD is enabled" issue for a while, and I think what you found is attributed to that issue.

    Thanks again for your help!
    Wile E.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    According to your TV Server logs, ESPN U had AC3 audio when you first started to view it:

    [COLLAPSE]2011-05-15 09:51:57.693359 [(25)]: Controller: find free card for channel ESPN U
    2011-05-15 09:51:57.694335 [(25)]: Controller: find card for channel ESPN U
    2011-05-15 09:51:57.695312 [(25)]: Controller: got 1 tuning details for ESPN U
    2011-05-15 09:51:57.696289 [(25)]: Controller: channel #1 tv:141 ESPNU Freq:0 Channel:141 Country:United States Tuner:Cable Video:YRYBYInput1 Audio:confused:PDIFInput2
    2011-05-15 09:51:57.696289 [(25)]: Controller: card:11 type:Atsc cannot tune to channel
    2011-05-15 09:51:57.696289 [(25)]: Controller: card:9 type:Atsc cannot tune to channel
    2011-05-15 09:51:57.697265 [(25)]: Controller: card:8 type:Analog can tune to channel
    2011-05-15 09:51:57.698242 [(25)]: Controller: card:8 type:Analog users: 0
    2011-05-15 09:51:57.698242 [(25)]: Controller: card:13 type:Analog can tune to channel
    2011-05-15 09:51:57.699218 [(25)]: Controller: card:13 type:Analog users: 0
    2011-05-15 09:51:57.699218 [(25)]: Controller: card:1 type:DvbIP is disabled
    2011-05-15 09:51:57.700195 [(25)]: Controller: card:6 type:RadioWebStream is disabled
    2011-05-15 09:51:57.701171 [(25)]: Controller: card:12 type:Analog channel not mapped
    2011-05-15 09:51:57.701171 [(25)]: Controller: card:10 type:Analog channel not mapped
    2011-05-15 09:51:57.702148 [(25)]: Controller: found 2 card(s) for channel
    2011-05-15 09:51:57.702148 [(25)]: AdvancedCardAllocation.GetAvailableCardsForChannel took 8 msec
    2011-05-15 09:51:57.703125 [(25)]: Controller: card:8 type:Analog is available
    2011-05-15 09:51:57.703125 [(25)]: Controller: card:13 type:Analog is available
    2011-05-15 09:51:57.703125 [(25)]: Controller: found 2 free card(s)
    2011-05-15 09:51:57.704101 [(25)]: AdvancedCardAllocation.GetFreeCardsForChannel took 10 msec
    2011-05-15 09:51:57.731445 [(25)]: Controller: StartTimeShifting ESPN U 245
    2011-05-15 09:51:57.731445 [(25)]: Controller: find free card for channel ESPN U
    2011-05-15 09:51:57.731445 [(25)]: Controller: find card for channel ESPN U
    2011-05-15 09:51:57.733398 [(25)]: Controller: got 1 tuning details for ESPN U
    2011-05-15 09:51:57.733398 [(25)]: Controller: channel #1 tv:141 ESPNU Freq:0 Channel:141 Country:United States Tuner:Cable Video:YRYBYInput1 Audio:confused:PDIFInput2
    2011-05-15 09:51:57.734375 [(25)]: Controller: card:11 type:Atsc cannot tune to channel
    2011-05-15 09:51:57.734375 [(25)]: Controller: card:9 type:Atsc cannot tune to channel
    2011-05-15 09:51:57.735351 [(25)]: Controller: card:8 type:Analog can tune to channel
    2011-05-15 09:51:57.735351 [(25)]: Controller: card:8 type:Analog users: 0
    2011-05-15 09:51:57.736328 [(25)]: Controller: card:13 type:Analog can tune to channel
    2011-05-15 09:51:57.736328 [(25)]: Controller: card:13 type:Analog users: 0
    2011-05-15 09:51:57.737304 [(25)]: Controller: card:1 type:DvbIP is disabled
    2011-05-15 09:51:57.737304 [(25)]: Controller: card:6 type:RadioWebStream is disabled
    2011-05-15 09:51:57.738281 [(25)]: Controller: card:12 type:Analog channel not mapped
    2011-05-15 09:51:57.739257 [(25)]: Controller: card:10 type:Analog channel not mapped
    2011-05-15 09:51:57.739257 [(25)]: Controller: found 2 card(s) for channel
    2011-05-15 09:51:57.740234 [(25)]: AdvancedCardAllocation.GetAvailableCardsForChannel took 7 msec
    2011-05-15 09:51:57.740234 [(25)]: Controller: card:8 type:Analog is available
    2011-05-15 09:51:57.740234 [(25)]: Controller: card:13 type:Analog is available
    2011-05-15 09:51:57.741210 [(25)]: Controller: found 2 free card(s)
    2011-05-15 09:51:57.741210 [(25)]: AdvancedCardAllocation.GetFreeCardsForChannel took 9 msec
    2011-05-15 09:51:57.742187 [(25)]: Controller: try max 2 of 2 cards for timeshifting
    2011-05-15 09:51:57.743164 [(25)]: tvcard:FreeSubChannel: subchannels count 1 subch#0 keep graph=True
    2011-05-15 09:51:57.744140 [(25)]: tvcard:FreeSubChannel :0 - is timeshifting (skipped)
    2011-05-15 09:51:57.744140 [(25)]: TV3BlasterPlugin: Received TV Server Event "StartZapChannel"
    2011-05-15 09:51:57.745117 [(25)]: TV3BlasterPlugin: Analog channel input source "YRYBYInput1"
    2011-05-15 09:51:57.745117 [(25)]: TV3BlasterPlugin: Tune request - Card: 8, Channel: 141, 141 ESPNU
    2011-05-15 09:51:57.746093 [ProcessExternalChannel(17)]: TV3BlasterPlugin: ProcessExternalCommand("Blast: 1|Port_1", 1, 141)
    2011-05-15 09:51:57.746093 [ProcessExternalChannel(17)]: TV3BlasterPlugin - BlastIR(): C:\ProgramData\IR Server Suite\IR Commands\1.IR, Port_1
    2011-05-15 09:51:57.747070 [(25)]: card: CardTune 8 141 ESPNU MediaServer:8:0
    2011-05-15 09:51:57.747070 [ProcessExternalChannel(17)]: TV3BlasterPlugin: ProcessExternalCommand("Blast: 4|Port_1", 4, 141)
    2011-05-15 09:51:57.748046 [ProcessExternalChannel(17)]: TV3BlasterPlugin - BlastIR(): C:\ProgramData\IR Server Suite\IR Commands\4.IR, Port_1
    2011-05-15 09:51:57.748046 [(25)]: card: Tune 8 to 141 ESPNU
    2011-05-15 09:51:57.749023 [ProcessExternalChannel(17)]: TV3BlasterPlugin: ProcessExternalCommand("Blast: 1|Port_1", 1, 141)
    2011-05-15 09:51:57.749023 [ProcessExternalChannel(17)]: TV3BlasterPlugin - BlastIR(): C:\ProgramData\IR Server Suite\IR Commands\1.IR, Port_1
    2011-05-15 09:51:57.750000 [(25)]: card: user: MediaServer:8:0 tune tv:141 ESPNU Freq:0 Channel:141 Country:United States Tuner:Cable Video:YRYBYInput1 Audio:confused:PDIFInput2
    2011-05-15 09:51:57.750000 [ProcessExternalChannel(17)]: TV3BlasterPlugin: ProcessExternalCommand("Blast: OK|Port_1", -1, 141)
    2011-05-15 09:51:57.750976 [ProcessExternalChannel(17)]: TV3BlasterPlugin - BlastIR(): C:\ProgramData\IR Server Suite\IR Commands\OK.IR, Port_1
    2011-05-15 09:51:57.756835 [(25)]: card: to different transponder
    2011-05-15 09:51:57.757812 [(25)]: TimeShifter.OnBeforeTune: resetting audio/video events
    2011-05-15 09:51:57.757812 [(25)]: HDPVR: Tune:0, tv:141 ESPNU Freq:0 Channel:141 Country:United States Tuner:Cable Video:YRYBYInput1 Audio:confused:PDIFInput2
    2011-05-15 09:51:57.758789 [(25)]: subch:0 OnBeforeTune
    2011-05-15 09:51:57.758789 [(25)]: HDPVR: Tune
    2011-05-15 09:51:57.759765 [(25)]: HDPVR: Tuned to channel 141 ESPNU
    2011-05-15 09:51:57.759765 [(25)]: subch:0 OnAfterTune
    2011-05-15 09:51:57.760742 [(25)]: subch:0 OnGraphStart
    2011-05-15 09:51:57.760742 [(25)]: subch:0 Graph already running - WaitForPMT
    2011-05-15 09:51:57.761718 [(25)]: subch:0 SetupPmtGrabber:pid 20 sid:1
    2011-05-15 09:51:57.761718 [(25)]: subch:0 set pmt grabber pmt:20 sid:1
    2011-05-15 09:51:57.762695 [(25)]: TimeShifter.OnAfterTune: resetting audio/video time
    2011-05-15 09:51:57.835937 [(19)]: HDPVR: OnPMTReceived() subch:0 pid 0x20
    2011-05-15 09:51:57.835937 [(25)]: HDPVR: PMT sid=0x1 pid=0x20 version=0xF
    2011-05-15 09:51:57.836914 [(25)]: Decode pmt
    2011-05-15 09:51:57.836914 [(25)]: subch:0 SetMpegPidMapping
    2011-05-15 09:51:57.837890 [(25)]: subch:0 pid:1FF pcr
    2011-05-15 09:51:57.837890 [(25)]: subch:0 pid:20 pmt
    2011-05-15 09:51:57.837890 [(25)]: subch:0 pid:1010 video type:H.264
    2011-05-15 09:51:57.838867 [(25)]: subch:0 map pid:1010 video type:H.264
    2011-05-15 09:51:57.839843 [(25)]: subch:0 pid:1011 audio lang: type:AC3
    2011-05-15 09:51:57.839843 [(25)]: subch:0 map pid:1011 audio lang: type:AC3

    2011-05-15 09:51:57.842773 [(25)]: HDPVR: Graph already running
    2011-05-15 09:51:57.842773 [(25)]: card: Tuner locked: True
    2011-05-15 09:51:57.842773 [(25)]: **************************************************
    2011-05-15 09:51:57.843750 [(25)]: ***** SIGNAL LEVEL: 100, SIGNAL QUALITY: 100 *****
    2011-05-15 09:51:57.843750 [(25)]: **************************************************[/COLLAPSE]

    For that reason MP client won't know to change audio codec... :(

    Your TsWriter log is kinda interesting. It seems like the audio format changed from AC3 to AAC and then back again while you were watching ESPN. It was still AC3 when you started ESPN U, then it changed to AAC about 4 seconds later.

    Thanks mm. Im sure you will find it quickly!

    On the contrary: I'm afraid I'm rather baffled! Perhaps we have to wait a minimum of x seconds for PMT to arrive to guarantee that we have the *right* PMT? I'm about to go to bed, so I'm going to sleep on this, but I'd welcome any ideas...

    mm

    [Edit: one last thought before I sleep... As a test, what happens if you do as you had suggested before: stick with SPDIF for DD/AC3 and pass channels with PCM audio through the RCA lines. You'd have to manually set the correct audio inputs for each channel based on audio type. I know it isn't ideal, but I'd like to know if it at least works from a testing perspective.]
     

    WileECoyote

    MP Donator
  • Premium Supporter
  • October 14, 2008
    1,156
    220
    Cary, NC
    Home Country
    United States of America United States of America
    Okay maybe this will help a little...

    When I change channels, I see about 2-3 seconds of the previous channel. So when I change from ESPN to ESPN U, the audio detected would indeed be still AC3 from ESPN. So you are correct in your assumption that maybe we need to wait a few more seconds for the PMT? Until the channel changes?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Is there any way we can tell that the channel has switched from the blaster? I can see that the PMT version is incrementing from 0 through to 255 and then wrapping around. Perhaps we can use that. Record the version when we switch channels and then wait for an updated version to know what audio type to use...
     

    WileECoyote

    MP Donator
  • Premium Supporter
  • October 14, 2008
    1,156
    220
    Cary, NC
    Home Country
    United States of America United States of America
    Is there any way we can tell that the channel has switched from the blaster? I can see that the PMT version is incrementing from 0 through to 255 and then wrapping around. Perhaps we can use that. Record the version when we switch channels and then wait for an updated version to know what audio type to use...

    I would be more inclined to use the PMT version. If that doesnt work then we can look at waiting 1-2 seconds after the blast (you can see in the logs when it blasts.)

    Anyway, go to bed :) We can ponder tomorrow...

    :D
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    My mind is still stuck on this issue. ;) :D

    Doing it with PMT versions would be tough, reason being that TsWriter only does callbacks to the TV Service when the elementary streams listed in the PMT change. That means that the PMT version number that we hold in the TV Service is not guaranteed to be up to date. The first PMT we receive after channel change is bound to have a greater version than the one that we last saw even though it is probably the "wrong" PMT. You could wait for the next PMT, but what happens when you've changed to a channel with the same audio stream? My guess is that we'd be stuffed because the elementary streams in the PMT would be the same (so we won't get a callback from TsWriter). That'd mean we'd have to operate with timeouts. It all gets very nasty... :(
     

    Users who are viewing this thread

    Top Bottom