[Request] Support for TennisTV
Opened this issue · 3 comments
Would you be willing to look into adding support for TennisTV subscriptions? I can provide a login for you to use when testing.
I don't think they use DRM but I'm not 100% sure.
Please let me know if you'd be willing to look into it :)
You can DM me at the Channels DVR forum and I can take a look.
I wasn't able to find the DM button on that site, can you try to dm me: https://community.getchannels.com/u/gray_m/
thanks
Hey,
I was playing around with it a bit, and I can use an extension like "Live Stream Downloader" to extract an m3u8 link. I tried playing that but ran into 2 issues:
First issue: the extracted m3u8 link expires very quickly, once it starts playing, its fine and the stream will continue till it ends, but if theres a large delay (idk the exact delay but like 2-5 min) then the link will expire and won't start. So basically, when the user requests to start a TennisTV stream from their IPTV player, the middle-ware program needs to generate the link on the fly. I dont think that would be an issue.
The second issue that the links require the following headers in order to play. This means that a standard IPTV player cannot handle them unless we proxy them.
'{"Referer":"https://www.tennistv.com/","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"}'
I've been using the following proxy HLS-proxy in my testing in which basically adds those headers to the stream. Then when the IPTV player loads the proxy stream, the headers are added before the stream is requested from TennisTV.
Create the headers file
echo '{"Referer":"https://www.tennistv.com/","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"}' /tmp/headers.json
Start the proxy with the headers file
hlsd --port 8080 --req-headers /tmp/headers.json
I then take the stream url and encode it before sending to the proxy:
stream_url="XXX.m3u8"
encoded=$(echo -n "$stream_url" | base64 -w 0)
proxied_url="http://pi-2:8080/${encoded}.m3u8"
Then in my IPTV player I can play something like the following. As long as I play the stream fast enough before it expires, I can watch for hours:
Ideally this process needs to be automated as it quite manual currently. I tried to find a way to automate obtaining the tennisTV m3u8 stream link but was unsuccessful. Hopefully all this info is helpful to you