IPTV: encrypted channels defined by m3u
Added by Jerome Lux almost 8 years ago
Hello,
I have built an iptv box (raspberry 2 + osmc + kody + tvheadend), which was working perfectly working until a few weeks ago. The iptv channel where ts streams defined by udp urls.
Unfortunatly, my iptv provider has now encrypted its channels. After a investigating, I realized that the channels are now defined by an http url pointing to a m3u file.
Here is an example of such a file:
#EXTM3U #EXT-X-TARGETDURATION:5 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:1356012 #EXT-X-START:TIME-OFFSET=-25,PRECISE=YES #EXT-X-KEY:METHOD=AES-128,URI="http://xxx.xxx.xxx.xxx:13888/SAESKEY/9528080856973573341042721192245/32/1032/aeskey_32_1481653292_1032.key",IV=0x54DAB4B0709DD0D9E0253B5062CCD780 #EXTINF:5, http://xxx.xxx.xxx.xxx:13888/SSEGMENT/9528080856973573341042721192245/32/1032/seg_32_1481653477_1032.ts #EXTINF:5, http://xxx.xxx.xxx.xxx:13888/SSEGMENT/9528080856973573341042721192245/32/1032/seg_32_1481653482_1032.ts #EXTINF:5, http://xxx.xxx.xxx.xxx:13888/SSEGMENT/9528080856973573341042721192245/32/1032/seg_32_1481653487_1032.ts #EXTINF:5, http://xxx.xxx.xxx.xxx:13888/SSEGMENT/9528080856973573341042721192245/32/1032/seg_32_1481653492_1032.ts #EXTINF:5, http://xxx.xxx.xxx.xxx:13888/SSEGMENT/9528080856973573341042721192245/32/1032/seg_32_1481653497_1032.ts
When I enter the url pointing to this file in vlc, I can play it.
Unfortunately, I wasn't able to define them in tvheadend just by giving the url.
Any clue on what I should do with this url to be able to setup tvheadend?
Thank you
Replies (1)
RE: IPTV: encrypted channels defined by m3u - Added by Jerome Lux almost 8 years ago
I found a solution by myself so just sharing it:
I wrote a small avconv command in a script which decode the stream (avconv, like vlc "understand" the url) and pipe it:
#!/bin/bash avconv -i http://USER:[email protected]:13888/LIVE/$1/1/ -codec copy -threads 2 -f mpegts -tune zerolatency pipe:1
The $1 parameter is the channel id
Then I use the pipe and script name as URL in the mux definition, just changing the last parameter to match the channel ID
pipe:///home/osmc/startchannel 41
it works perfectly.