Project

General

Profile

Is it possible to execute a script on channel change in Tvheadend?

Added by r 2 about 7 years ago

I'm trying to integrate and Engel DBV-S2 decoder in TVH using sat-ip. The issue is that I need to launch specific http post request to the decoder to do a channel change, if not, it streams the previous channel you were watching. For that reason I'm looking for some way that each time TVH executes a channel change, execute some kind of script. Is there any way to do something similar?.
Regards,


Replies (3)

RE: Is it possible to execute a script on channel change in Tvheadend? - Added by Mark Clarkstone about 7 years ago

You could import the channels using an m3u playlist using pipe to a script but that's a bit of a hack & not very nice.

I'd open a feature request for something like "Run script on tune request".

RE: Is it possible to execute a script on channel change in Tvheadend? - Added by Jerry Fath about 7 years ago

Maybe not the most elegant solution, but if you scroll to the bottom of this wiki page, you'll see a note about using a proxy for IPTV. That proxy allows calling a script just before and after streaming requests.

[[https://tvheadend.org/projects/tvheadend/wiki/Custom_MPEG-TS_Input
]]

RE: Is it possible to execute a script on channel change in Tvheadend? - Added by r 2 about 7 years ago

Thank you for your feedback, the proposed solutions are tricky but clever ones. The issue I see with both of them for my purposes is that the privileges associated to the stream profiles are lost. For example, I have different users with different priorities. In such way if i'm seeing something and other user tries to change the channel, as their users have an associated stream profile with lower priority, TVH doesn't allow him to change it reporting that there aren't free adapters. Other example would be in case that a DVR Recording is running, the proxy or m3u channel list will send the order to the decoder to change the channel although for TVH this shouldn't happen because DVR Recordings usually have higher priority than LiveTV.
These solutions bypass TVH logic in these kind of scenarios. I was looking for a more integrated way supported by TVH, probably I'm asking too much.

    (1-3/3)