Best approach to map channels (2 Viewers)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    2. SD successfully mapped the other HDHomeRun channels to the correct SD program guide channels. BUT for each channel it mapped to the HDHomeRun, it did not create an equivalent entry for the HD-PVR when it should have.
    This functionality does not exist in the current code, so SD behaved as expected. SD either creates a channel, or it doesn't. It creates a channel when no existing channel can be found to link with the guide info. It doesn't create a channel when an existing channel *is* found. When SD creates channels, it creates a channel with a single tuning detail. It never adds tuning details to existing channels created by TV Server. When channels already exist in TV Server, SD takes it as a sign that TV Server knows how to tune that channel and it doesn't need any further configuration. This is an extension of the fact that SD doesn't deal in tuners. It doesn't know that you have an HD-PVR that is also capable of tuning those channels. Nor should it blindly add a tuning detail as it does when it creates channels - that tuning detail may be totally incorrect and conflict with the existing tuning details. This is totally the correct approach in my opinion.

    For instance both the HDHomeRUn (by itself as it is a tuner) and the HDPVR (via the cablebox) can tune in channel 600.
    Remember that SD doesn't know this - it doesn't know anything about what tuners you have or what channels they have the ability to tune.

    ON the HDHomeRUn, I renamed the channel from WRHM-HD to WHRMDT to match the entry for channel 600 WHRMDT in SD.
    Channels don't belong to any tuner in particular. A channel may have zero or more tuning details. When you link a channel with a tuner, TV Server uses the tuning detail type to work out how to use a given tuner to tune that channel.

    Example: WHRMDT
    After scanning it in with the HDHomeRun, there is a channel with a single ATSC/QAM tuning detail. TV Server configuration allows you to map that channel to any ATSC/QAM tuner because the channel has the ATSC/QAM tuning detail. If the channel also had a DVB-S (satellite) tuning detail then you could map the channel to any ATSC/QAM or satellite tuner. Coming to the situation with the HD-PVR. TV Server treats the HD-PVR as an analog device. To be able to map a channel to an analog device the channel must have an analog tuning detail. What you seem to be expecting is that SD would add an analog tuning detail to a given set of channels (or maybe all channels that SD doesn't create), but again it doesn't know what kind of tuners/devices you have available - in my opinion that is totally not the right thing for SD to do. The fact that SD can create channels that work with the HD-PVR is pure luck. Nothing more. It is not designed to do that - we know it does so we exploit the function to save you time, but the things the you're expecting it to do are things that I would consider completely outside the domain and purpose of SD.

    So I have to add an entry to channel 600 (and the 15 other channels that are missing) for the HDPVR.
    Correct - that is what you should expect. Again, the tuning details in the channels that SD creates are simply "placeholders". The fact that they work with the HD-PVR is a *huge* bonus for you because you don't have to create them manually.

    mm
     

    ijourneaux

    Portal Pro
    June 28, 2011
    86
    6
    Home Country
    United States of America United States of America
    This is an extension of the fact that SD doesn't deal in tuners. It doesn't know that you have an HD-PVR that is also capable of tuning those channels. Nor should it blindly add a tuning detail as it does when it creates channels - that tuning detail may be totally incorrect and conflict with the existing tuning details.

    I think though that the SD does know that there is an HDPVR. You specify the the input type (component. Don't remember the exact selection) and this tells SD to create the channel placeholders for the HDPVR. I believe correct behavior would be to always create all of the HDPVR channel placeholders, even it it can map to an existing channel.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    That option is always available, and it contains all the possible video inputs that MP supports. It's totally generic...
     

    ijourneaux

    Portal Pro
    June 28, 2011
    86
    6
    Home Country
    United States of America United States of America
    Maybe I am preaching to the choir but in the case of the HD-PVR why wouldn't SD always add all of the channels versus the decision to not add the ones it could map to a to a channel directly. I haven't seen all of the possible hardware configurations but I can't come up with a situation where the better option wouldn't be to all a place holder for every channel in SD to the HD-PVR where you can delete the ones you don't want.

    Regardless I need to get the missing channels back in to the list of channels availabel for the HD-PVR and ecorrectly fix the one channel that was mapped incorrectly because the channel matched. I have to reread your instructions and step through the process.

    Does SD/TVServer maintain a mapping of what channel gets what guide information? Could that XML file be edited directly?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Maybe I am preaching to the choir...
    :D
    I do fully admit that my opinions about this are quite strong. I hold this opinion for two reasons:
    1. I think your setup is out of the ordinary, and your expectations are quite high (just being honest - no offense intended).
    2. TV Server should do better.

    The second reason is my primary reason. SD does a reasonable job at helping you get the HD-PVR set up, but it is TV Server that should allow you to automate the creation of channels for capture inputs.

    I'm working on something for this already as I mentioned. My approach will allow people to enter the names and channel numbers of each of their channels into a grid list. There'll be access to all the parameters for a regular analog tuning detail - these parameters will be set for all the channels in the list. I'm also going to support automating the channel details entry by "importing" an XMLTV file. In time that could possibly be extended to support other sources like SD. It would still be a little tedious to enter the channel names and numbers, but not half so tedious as it is now, and incredibly easy if you have an XMLTV file.

    For some people (I'm hoping for the majority) that will be perfect.

    For you I guess that approach is not as attractive as it might be since there won't be any immediate support for automatically getting the channel names and numbers from SD. However you have alternatives like mc2xml that would hopefully give you an accurate channel lineup. Also, because XMLTV files can be edited in a text editor you can make your own XMLTV file relatively easily. The only other thing you'd have to do would be combining the channels with the HDHomeRun and [optionally] analog tuner sources. Assuming you name your channels correctly, SD linking should be a breeze.

    ...but in the case of the HD-PVR why wouldn't SD always add all of the channels versus the decision to not add the ones it could map to a to a channel directly.
    Because if TV Server already has the channels then SD assumes that they have been scanned in by TV Server and that tuning details are complete and correct. Adding the tuning details to existing analog channels may cause problems. I've explained this before, but I think you should actually try this so you understand exactly what I mean.

    1. Pick any random analog cable channel that you have scanned in with one of the Adaptec tuners.
    2. Add another analog tuning detail that will work for the HD-PVR (ie. set the channel number and crossbar video and audio sources etc.).
    3. Ensure the channel is mapped to both Adaptec tuners and the HD-PVR.
    4. Go to the manual control section of TV Server configuration.
    5. Attempt to tune the channel with the HD-PVR.
    6. Attempt to tune the channel with one of the Adaptec tuners.

    What is the result?
    For the Adaptec tuner:
    It depends on which tuning detail it tries first. If it tries the correct tuning detail then it should work straight off the bat. If it tries the wrong one then it *might* gracefully fail. If the channel number is a high logical channel number (like 600 or something) that doesn't map to a real physical channel allocation then there's no telling what will happen. The tuner driver might bork itself. It might tune the wrong channel. It might tune something different (you should check this if possible). If that first problem isn't too bad then it becomes a question of whether TV Server is smart enough to try the next analog tuning detail. *If* it does then I'd expect that tuning attempt to succeed.

    For the HD-PVR:
    It depends on which tuning detail it tries first. If it tries the correct tuning detail then it should work straight off the bat. If it tries the wrong one then the driver may have a meltdown when it tries to switch to the tuner input on the crossbar, or it could simply blast the STB to the wrong channel. The tuning attempt may fail in the first case and *might* fall back to the correct tuning detail as described above, and in the second case TV Server hasn't got a hope of knowing that something went wrong (ie. the wrong channel was blasted).

    So to summarise: there is a fundamental conflict between having the analog cable channels mapped to the Adaptec tuners as well as the HD-PVR. That is why SD should not do what you're suggesting. In my opinion causing problems that can be fixed is far worse than making setup slightly faster/easier for a somewhat unusual setup (again, no offense intended).

    Note:
    1. In the above scenario I've assumed that the STB logical channel numbers (the ones that you blast) don't match the physical channel numbers. If they did then this whole discussion might be a moot point as the Adaptec tuning details *might* work for the HD-PVR too. It depends on what the HD-PVR driver does when instructed to switch to the tuner input. If it ignores it then fine - SD doesn't need to create tuning details.
    2. I've ignored the case where SD creates an analog tuning detail for a digital channel. Theoretically this won't cause problems, and it would help in the case of your HDHomeRun channels. Technically it is still incorrect.

    I haven't seen all of the possible hardware configurations but I can't come up with a situation where the better option wouldn't be to all a place holder for every channel in SD to the HD-PVR where you can delete the ones you don't want.
    From my perspective there are very few situations where it could be considered an advantage, and even in your own situatioin it may cause problems (as described in my example above).

    Does SD/TVServer maintain a mapping of what channel gets what guide information? Could that XML file be edited directly?
    Yes, TV Server has a mapping. The link is against the externalId column in the database Channel table, not in an XML file. If you're not comfortable editing the database contents then you also could export your channel list, manually tweak the XML, delete your channels, and then reimport it and re-link the channels to the tuning details. Note that I don't think SD handles providing guide information to multiple channels that have the same externalId.

    mm
     

    ijourneaux

    Portal Pro
    June 28, 2011
    86
    6
    Home Country
    United States of America United States of America
    I must admit I would never have expected this level of complexity as it was not an issue with either BeyondTV (which I have been using for 7-8 years total and added the HD-PVR 3-4 years ago) and SageTV that I played around with when I first started looking for an alternative to BeyondTV. Unfortuantely SageTV wa aquired by Google before I could purchase any licenses. I even tried NPVR and it wasn't as smooth I I would have like, I was able to configure all of the channels correctly.

    Hence I am looking for a new solution. I did consider MythTV but at this point, I am not too eager to take on Linux. Remember this TV tuning solution is used 24x7 by several family members who are just expecting things to work.

    I do this because I am interested in the learning experience. If I wasn't, I would have given up on MediaPortal several weeks ago <grin>. To be honest, without your active interest and suggestions, I would have probably given up.

    So, in the short term, based on your suggestions, I have gotten closer. What is the best approach to correcting the remaining issues I have in the channels/channel guide?

    1. I have the one HDHomeRun channel that was mapped incorrectly based on the channel number.
    2. The 15 or so missing channel entries for the HDPVR that correspond to HDHomeRun channels that were mapped by SD.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    I must admit I would never have expected this level of complexity as it was not an issue with either BeyondTV (which I have been using for 7-8 years total and added the HD-PVR 3-4 years ago) and SageTV that I played around with when I first started looking for an alternative to BeyondTV. Unfortuantely SageTV wa aquired by Google before I could purchase any licenses. I even tried NPVR and it wasn't as smooth I I would have like, I was able to configure all of the channels correctly.
    I don't know how any of the other software works. I am a little surprised, but I absolutely take your word for it.

    I do this because I am interested in the learning experience. If I wasn't, I would have given up on MediaPortal several weeks ago <grin>. To be honest, without your active interest and suggestions, I would have probably given up.
    You've encountered some pretty annoying and frustrating problems what with the Adaptec tuners not working, the USB-UIRT issue, this... *Thank you* for your patience with us. :D

    So, in the short term, based on your suggestions, I have gotten closer. What is the best approach to correcting the remaining issues I have in the channels/channel guide?

    1. I have the one HDHomeRun channel that was mapped incorrectly based on the channel number.
    1. Delete the channel.
    2. Rescan with the HDHomeRun.
    3. Re-link to the 2nd HDHomeRun tuner.
    4. Rename the channel to match the callsign.
    5. Turn off the channel number matching in SD.
    6. Force EPG import.

    2. The 15 or so missing channel entries for the HDPVR that correspond to HDHomeRun channels that were mapped by SD.
    1. Locate and select a "broken" channel.
    2. Click "edit".
    3. Click "add".
    4. Select "analog" and click "OK".
    5. Set the channel number as the number used to select the channel on the STB so that blasting will work.
    6. Select the correct country.
    7. Select "cable" as input type.
    8. Select the appropriate crossbar video input (probably YRYBY#1).
    9. Click "OK" to save the analog tuning detail.
    10. Click "OK" to save the channel.
    11. Repeat for each "broken" channel.
    12. Link the channels to the HD-PVR.

    After that, make sure you export your channel list and store it in a safe place. You don't want to have to do this again. ;)

    mm
     

    ijourneaux

    Portal Pro
    June 28, 2011
    86
    6
    Home Country
    United States of America United States of America
    The Adaptec tuner issue was one of those thing. I was glad you were able to help get it to work but in the grand scheme. This isn't the first time and probably won't be the last time a specific TV tuner is not supported by a software package.

    In some ways the issue with the USB-UIRT was the same. The default IRSS installation was as a service. If I had selected as an application, everything would have worked as it should. Since I didn't, it ended up highlighting an issue with simultaneous access to the USB-UIRT from an application and a service.

    The channel thing is alittle more frustrating though but I am stepping through the process again as we speak. I wll let you know how it turns out. It is the middle of the night here. Can't sleep so might as well do something.

    Base don the immediate steps above I should be able to finish this part up.

    If I can get past this, I can start trying to figure out how to actually switch over from BeyondTV to MediaPortal as seemlessly as possible.

    Just finished adding in all of the channels that were missing fgrom the HDPVR. Forced a guide update in Mediaportal I can select and watch the channel but I don't have any guide data.

    Her is the situation

    for channel 600 WHRMDT on the HDHomeRun, SD renamed it to WHRMDT. I created a new 600 WRHMDT with the correct tuning information and associated it with the HDPVR.

    Restart TVServer with force guide update on restart selected.

    In MediaPortal, I see the entry for WHRMDT that is mapped to the HDHomeRun and an entry for 600 WHRMDT that is mapped to the HDPVR. I can watch both channels correctly. One tunes using the HDHomeRun. The other tunes via the stb.

    Unfortunately no guide data for 600 WHRMDT. Is the solution here to combine up the stations that are identical. I was planning on doing that as a last step and use the tuner priority to select the actual tuner. For testing purposes I wanted to keep them completely separate.
     

    ijourneaux

    Portal Pro
    June 28, 2011
    86
    6
    Home Country
    United States of America United States of America
    I have reread you comments I guess I still don't understand why the approahc you describ is the best. Perhaps I /we am are getting confused on the tuner channel versus guide channel.

    In my mind, tuner channels are are associated with tuner and and represent the channels that have been scanned in. So I think we can agree each tuner has it sets of channels. The SD plug in comes in and tries to associate a guide channel with each one of the tuner channels based on callsign and or channel number. Each tuner channel has one connection to a guide channel. Each guide channel can have several connections; one to each matching tuner channel on the individual tuners.

    So far I think this is correct?

    Then the HD-PVR comes into the picture. It's tuner is the cablebox so you can't scan for the tuner channels. You have to provide them somehow. What is the best starting point for the list of "tuner" (in this case the tuner is the cable box) channels avaialble to the HD-PVR. I would argue that the best choice is all of the channels in SD listing. But that point is somewhat moot. Once the channels are created, they should be unique to the HD-PVR just as the scanned tuner channels are unique to the physical tuners. There should never be a case, as you describe above where a physical tuner or HD-PVR tuner "share" tuning details.

    I guess, no I absolutely, agree with you.

    Adding the tuning details to existing analog channels may cause problems.

    but I don't think that is what I am proposing. Each tuner channel, be it a physical tuner channel on a conventiaonl tuner card or "virtual" (for lack of a better term) channel as in the HD-PVR has to be unique.

    So what is the best starting point for the lsit of "virtual" tuner channel availalbe to the HD-PVR. I would still argue that it is the total list of channels in the SD channel list. From this starting point, you could delete any invalid channels. In my case, they are all valid.

    If this doesn't make sense, perhaps I am missing a structural "feature" of TVServer that prevents this from happening. I truely believe this is the way it works in SageTV, BeyondTV and the other opensource PVR balled NPVR (based on GBPVR).

    Just trying to understand.

    PS I went lookign for a guide on creating a compilable environment for MediaPortal. I found the wiki and can retrieve the sources. Is the only option for a development environment Visual Studio? I realize that the Express versions of C++ and C# don't have all of the features but I would ahve thought someone would have pulled together a gudie on how to do it if you didn't want to fork out the bucks for a full copy of Visual Studio.

    Take Care
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    In my mind, tuner channels are are associated with tuner and and represent the channels that have been scanned in. So I think we can agree each tuner has it sets of channels...

    Once the channels are created, they should be unique to the HD-PVR just as the scanned tuner channels are unique to the physical tuners.
    No I can't agree with you because that is just not how TV Server works. The two fundamental concepts of TV Server are:

    1. channels
    2. tuning details

    Each channel may have zero or more tuning details.

    Channels are basically nothing except a name and an association to guide info.

    Tuning details are the parameters for tuning the channel on a particular *kind* of device. Note that I *don't* say "particular tuner" as that is *not* how TV Server works.

    The "kinds" of devices that I'm talking about are DVB-S (satellite), DVB-T (terrestrial), ATSC/QAM, and analog. Analog includes both analog tuners like the Adaptec tuners *and* the HD-PVR.

    You tell TV Server what *channels* a tuner can tune by using the mappings section of TV Server configuration, but that doesn't tie down to specific tuning details.

    Any tuning detail(s) associated with a channel that are of the type that a tuner can tune can and *will* be used when TV Server asks that tuner to tune a channel.

    Example:
    - channel with two ATSC tuning details
    - ATSC tuner
    - link the channel to the tuner
    - *both* tuning details become valid ways of tuning the channel on the ATSC tuner because they are both ATSC tuning details
    - other kinds of tuning details would be ignored as an ATSC tuner can't tune satellite channels

    I can't explain it any clearer than that.

    ...and I don't think that is what I am proposing. Each tuner channel, be it a physical tuner channel on a conventiaonl tuner card or "virtual" (for lack of a better term) channel as in the HD-PVR has to be unique.
    As I previously explained, two analog tuning details (for the HD-PVR and Adaptec tuners) within a single channel will be a conflict in your setup, no matter how you create or combine the channels. In other words: there is a fundamental conflict between the HD-PVR and Adaptec tuners. Subject to the assumptions that I explained in my example a couple of posts back, you cannot have a *single channel* in TV Server that can be tuned by an Adaptec tuner and the HDPVR. You can have two separate channels, but that comes with some massive drawbacks. The problems with having separate channels are:

    1. When you attempt to tune a channel, TV Server won't know about all the ways that it can be tuned.
    2. Multiple entries for the same channel in your channel list.
    3. Guide information available for only one of the entries.

    Example: you want to watch a channel that can be received by your HDHomeRun. You know that the HDHomeRun tuners and the HDPVR can tune the channel that you want to watch. Your HDHomeRun tuners are both busy recording two different channels. Assuming that the HD-PVR is free it should be possible to watch the channel. If you haven't put the ATSC/QAM and analog (HD-PVR) tuning detail into a single channel entry then you will have two channels in your channel list that represent the same channel. One - the one with the ATSC/QAM tuning detail that the HDHomeRun can tune - will be unavailable; attempting to view it will result in MP saying "no available tuners". The other - the one with the analog tuning detail that the HD-PVR can tune - will be available. That's a little annoying, but of course you may be okay with that.

    Consider for a moment though what happens if it wasn't you that was wanting to tune that channel - it was another recording that you had scheduled. If you scheduled the recording on the "HDHomeRun channel" then that recording would fail. TV Server simply doesn't realise that the two channels are the same. Totally not cool right? Either you would have to schedule your recordings very carefully or... you put the two tuning details into a single channel. That is precisely why I am saying that you want one channel in TV Server for each channel in your SD lineup. Does that make sense now?

    Further, regarding point 3 above: if my suspicions are correct then it may not even be possible to have two channels in TV Server that get their guide data from the same channel in the SD lineup. *That* would be a deal-breaker surely? It would make it very difficult to schedule recordings.

    So to summarise what I'm saying: at the end of the process you *really* want to come out with a situation where you have one channel in TV Server for each channel in your SD lineup. Either that or you accept the limitations of another outcome where you have one channel per device type... or you simply don't use MP.

    The only thing I'm saying that is a problem here is getting one-to-one links between your analog cable channels and the guide info from SD, and that is because TV Server treats the HD-PVR as an analog device like the Adaptec tuners.

    There is no conflict between the HDHomeRun and the HD-PVR or the HDHomeRun and the Adaptec tuners. You *can* and should (in my opinion) combine the two kinds of tuning details for the channels that your HDHomeRun can receive.

    When you consider setting up the channels that the HDHomeRun can tune then there are several ways to do it that I can think of. I've tried to explain in great detail what I think is the best and fastest way, taking into account all that I know about our code, SD and what you've told me about your setup. If you don't like the way that I've suggested then you're welcome to try other ways. Only know that I've been working on the TV Server code almost every day for the last year, and I've been using TV Server for maybe 4 years now. I'm trying to help but I feel like you don't believe me and if I'm honest, that really hurts.

    So what is the best starting point for the lsit of "virtual" tuner channel availalbe to the HD-PVR. I would still argue that it is the total list of channels in the SD channel list. From this starting point, you could delete any invalid channels. In my case, they are all valid.
    Sure, SD will give you channels that work perfectly with your HD-PVR. If you want to go that route and then scan in channels from your other devices afterwards and combine them then go ahead. As I've already explained, if you don't do the combining correctly then you may loose the guide info associations. Further, you may as well not have the Adaptec tuners.

    My approach was to not allow the HD-PVR to be used for the analog cable channels because I understand that there is a conflict - that has to be worked around carefully. It only seems logical to me to use the Adaptec tuners in preference to the HD-PVR for the analog cable channels since there are two of them. That means you can record two analog cable channels rather than the one that you'd be limited to if you link those channels to the HD-PVR. A further disadvantage of using the HD-PVR for those channels is that it prevents you from watching or recording an encrypted cable channel from the STB at the same time as watching or recording an analog cable channel that the Adaptec tuners might otherwise have tuned.

    If this doesn't make sense, perhaps I am missing a structural "feature" of TVServer that prevents this from happening. I truely believe this is the way it works in SageTV, BeyondTV and the other opensource PVR balled NPVR (based on GBPVR).
    Yep - as I've explained, you do seem to be misunderstanding how TV Server works. The flexibility of not tying tuning details to particular tuners allows you to do things like scan for the analog cable channels on one of the Adaptec tuners and then link them to the other tuner in 2 seconds without a rescan. Where it comes back to bite you is in the conflict with HD-PVR. If other software suits you better then by all means don't use MediaPortal, or customise the code to suit your setup.

    PS I went lookign for a guide on creating a compilable environment for MediaPortal. I found the wiki and can retrieve the sources. Is the only option for a development environment Visual Studio? I realize that the Express versions of C++ and C# don't have all of the features but I would ahve thought someone would have pulled together a gudie on how to do it if you didn't want to fork out the bucks for a full copy of Visual Studio.
    I certainly use Visual Studio, and to the best of my knowledge so do all the other team members. However, I think it should be possible to compile with MSBUILD as described in the wiki - there are scripts provided with the code. If you want to try a different way then by all means try it. I just can't guarantee that it would work.

    for channel 600 WHRMDT on the HDHomeRun, SD renamed it to WHRMDT. I created a new 600 WRHMDT with the correct tuning information and associated it with the HDPVR.
    That is not what my instructions suggested you do - my instructions were to create a new tuning detail *within* the channel that the HDHomeRun can tune.

    Restart TVServer with force guide update on restart selected.

    In MediaPortal, I see the entry for WHRMDT that is mapped to the HDHomeRun and an entry for 600 WHRMDT that is mapped to the HDPVR. I can watch both channels correctly. One tunes using the HDHomeRun. The other tunes via the stb.

    Unfortunately no guide data for 600 WHRMDT. Is the solution here to combine up the stations that are identical. I was planning on doing that as a last step and use the tuner priority to select the actual tuner. For testing purposes I wanted to keep them completely separate.
    As explained above and several times previously, you can't get two channels in MediaPortal to receive guide data from a single SD channel. SD doesn't support that. Please just follow my instructions. You would have been able to tune using either the HD-PVR or HDHomeRun based on priorities, and for testing purposes you could have used the "manual control" section in TV Server (ie. select the channel, then select the row associated with the tuner you want to test, then click "start timeshift").

    mm
     

    Users who are viewing this thread

    Top Bottom