<div dir="ltr">Hello,<div><br></div><div>I subscribe to a pay IPTV service and am trying to add the streams as a source on mythbackend (0.28-fixes). I originally had everything working by adding an m3u file as a source to populate the channels. However, the source provider changed their format and now each channel is called as a m3u8 file.</div><div><br></div><div>For example:</div><div><br></div><div><a href="http://ok2.se:8000/live/">http://ok2.se:8000/live/</a><username>/<password>/<wbr>170.m3u8<br></div><div><br></div><div>is the initial request when the stream is called, and the contents of the resulting m3u8 file is:</div><div><br></div><div><div>#EXTM3U</div><div>#EXT-X-VERSION:3</div><div>#EXT-X-MEDIA-SEQUENCE:2409</div><div>#EXT-X-ALLOW-CACHE:YES</div><div>#EXT-X-TARGETDURATION:11</div><div>#EXTINF:9.159500,</div><div>/hlsr/GBFRWBVfEAoaBwEKAVAEAgkGBV0HUAIPBgYMA1RTUlRXUgwBBA4FBQgWGhBGQhNRUAlsDAFGXgZTABgSR0ZVRzxaXRtcFQMBDQ0DEBkUFV1cARFfVUhGRw1UFgoQBwUMVwsbFURSSkRdRlhTWWkFUUcNUABHXgpCCFwYEl1bb1EGXlhXAhUIEggWGhBcRREWC0ZwCggHBUQQEHdRUFlVFSBcVFQTWVtTWUBfXVtFQXh9JxFJRwYNQxZRQFUQDxIEWwQLG0o</div><div>VUV9NWkJATBRbFmQ3EUlHARxDAV5HWV1bEg9BXgpMXhUeElFHaUBQRRVGVAVeABdGXhVUEhgSX1RIagBcV1cDVEZZV1pFEA8UUBYdRl4KCw0QWBZvRFlWFwoXWgQLDERK/<username>/<password>/170/c89df70bc34e898631f98344476a572b/170_2409.ts</div><div>#EXTINF:10.193900,</div><div>/hlsr/GBFRWBVfEAoaBwEKAVAEAgkGBV0HUAIPBgYMA1RTUlRXUgwBBA4FBQgWGhBGQhNRUAlsDAFGXgZTABgSR0ZVRzxaXRtcFQMBDQ0DEBkUFV1cARFfVUhGRw1UFgoQBwUMVwsbFURSSkRdRlhTWWkFUUcNUABHXgpCCFwYEl1bb1EGXlhXAhUIEggWGhBcRREWC0ZwCggHBUQQEHdRUFlVFSBcVFQTWVtTWUBfXVtFQXh9JxFJRwYNQxZRQFUQDxIEWwQLG0o</div><div>VUV9NWkJATBRbFmQ3EUlHARxDAV5HWV1bEg9BXgpMXhUeElFHaUBQRRVGVAVeABdGXhVUEhgSX1RIagBcV1cDVEZZV1pFEA8UUBYdRl4KCw0QWBZvRFlWFwoXWgQLDERK/<username>/<password>/170/e14772fd8776a556b4c9f57c1e7f06a1/170_2410.ts</div><div>#EXTINF:10.177200,</div><div>/hlsr/GBFRWBVfEAoaBwEKAVAEAgkGBV0HUAIPBgYMA1RTUlRXUgwBBA4FBQgWGhBGQhNRUAlsDAFGXgZTABgSR0ZVRzxaXRtcFQMBDQ0DEBkUFV1cARFfVUhGRw1UFgoQBwUMVwsbFURSSkRdRlhTWWkFUUcNUABHXgpCCFwYEl1bb1EGXlhXAhUIEggWGhBcRREWC0ZwCggHBUQQEHdRUFlVFSBcVFQTWVtTWUBfXVtFQXh9JxFJRwYNQxZRQFUQDxIEWwQLG0o</div><div>VUV9NWkJATBRbFmQ3EUlHARxDAV5HWV1bEg9BXgpMXhUeElFHaUBQRRVGVAVeABdGXhVUEhgSX1RIagBcV1cDVEZZV1pFEA8UUBYdRl4KCw0QWBZvRFlWFwoXWgQLDERK/<username>/<password>/170/e102e3411cdd520fcdc4e5f674c1a16a/170_2411.ts</div><div>#EXTINF:10.177300,</div><div>/hlsr/GBFRWBVfEAoaBwEKAVAEAgkGBV0HUAIPBgYMA1RTUlRXUgwBBA4FBQgWGhBGQhNRUAlsDAFGXgZTABgSR0ZVRzxaXRtcFQMBDQ0DEBkUFV1cARFfVUhGRw1UFgoQBwUMVwsbFURSSkRdRlhTWWkFUUcNUABHXgpCCFwYEl1bb1EGXlhXAhUIEggWGhBcRREWC0ZwCggHBUQQEHdRUFlVFSBcVFQTWVtTWUBfXVtFQXh9JxFJRwYNQxZRQFUQDxIEWwQLG0o</div><div>VUV9NWkJATBRbFmQ3EUlHARxDAV5HWV1bEg9BXgpMXhUeElFHaUBQRRVGVAVeABdGXhVUEhgSX1RIagBcV1cDVEZZV1pFEA8UUBYdRl4KCw0QWBZvRFlWFwoXWgQLDERK/<username>/<password>/170/3c28837c6209dcb13112c8dc195266d8/170_2412.ts</div><div>#EXTINF:10.193900,</div><div>/hlsr/GBFRWBVfEAoaBwEKAVAEAgkGBV0HUAIPBgYMA1RTUlRXUgwBBA4FBQgWGhBGQhNRUAlsDAFGXgZTABgSR0ZVRzxaXRtcFQMBDQ0DEBkUFV1cARFfVUhGRw1UFgoQBwUMVwsbFURSSkRdRlhTWWkFUUcNUABHXgpCCFwYEl1bb1EGXlhXAhUIEggWGhBcRREWC0ZwCggHBUQQEHdRUFlVFSBcVFQTWVtTWUBfXVtFQXh9JxFJRwYNQxZRQFUQDxIEWwQLG0o</div><div>VUV9NWkJATBRbFmQ3EUlHARxDAV5HWV1bEg9BXgpMXhUeElFHaUBQRRVGVAVeABdGXhVUEhgSX1RIagBcV1cDVEZZV1pFEA8UUBYdRl4KCw0QWBZvRFlWFwoXWgQLDERK/<username>/<password>/170/735307456698a5309ac54ff1608ccaa4/170_2413.ts</div><div>#EXTINF:10.177200,</div><div>/hlsr/GBFRWBVfEAoaBwEKAVAEAgkGBV0HUAIPBgYMA1RTUlRXUgwBBA4FBQgWGhBGQhNRUAlsDAFGXgZTABgSR0ZVRzxaXRtcFQMBDQ0DEBkUFV1cARFfVUhGRw1UFgoQBwUMVwsbFURSSkRdRlhTWWkFUUcNUABHXgpCCFwYEl1bb1EGXlhXAhUIEggWGhBcRREWC0ZwCggHBUQQEHdRUFlVFSBcVFQTWVtTWUBfXVtFQXh9JxFJRwYNQxZRQFUQDxIEWwQLG0o</div><div>VUV9NWkJATBRbFmQ3EUlHARxDAV5HWV1bEg9BXgpMXhUeElFHaUBQRRVGVAVeABdGXhVUEhgSX1RIagBcV1cDVEZZV1pFEA8UUBYdRl4KCw0QWBZvRFlWFwoXWgQLDERK/<username>/<password>/170/d5210859c91bb4de189f8a811e4465af/170_2414.ts</div></div><div><br></div><div>When I add the url to VLC, the stream plays just fine, however, it won't stream through mythbackend.</div><div><br></div><div>This is the relevant mythbackend log entry:</div><div><br></div><div><div>2017-04-08 10:57:51.489225 I [1081/1183] TVRecEvent tv_rec.cpp:1073 (HandleStateChange) - TVRec[3]: Changing from None to WatchingLiveTV</div><div>2017-04-08 10:57:51.489770 I [1081/1183] TVRecEvent mythdbcon.cpp:422 (PurgeIdleConnections) - New DB connection, total: 11</div><div>2017-04-08 10:57:51.501909 I [1081/1183] TVRecEvent tv_rec.cpp:3685 (TuningFrequency) - TVRec[3]: TuningFrequency</div><div>2017-04-08 10:57:51.796453 I [1081/1183] TVRecEvent mythsingledownload.cpp:75 (DownloadURL) - <a href="http://ok2.se:8000/live/">http://ok2.se:8000/live/</a><username>/<password>/170.m3u8 -> <a href="http://199.66.91.82:8000/live/">http://199.66.91.82:8000/live/</a><username>/<password>/170.m3u8?token=GBFRWBVfEAoaAw5XAQIEA1NUBQRVAFFRUlZXBwEHBwIGUFwLX1IFAAsWGhBGQhNRUAlsDAFGXgZTABgSR0ZVRzxaXRtcFQMBDQ0DEBkUFV1cARFfVUhGRw1UFgoQBwkDVgQbFURSSkRdRlhTWWkFUUcNUABHXgpCCFwYEl1bb1EGXlhXAhUIEggWGhBcRREWC0ZwCggHBUQQEHdRUFlVFSBcVFQTWVtTWUBfXVtFQXh9JxFJRwYNQxZRQFUQDxIEVgIKG0oVUV9NWkJATBRbFmQ3EUlHARxDAV5HWV1bEg9BXgpMXhUeElFHaUBQRRVGVAVeABdGXhVUEhgSX1RIagBcV1cDVEZZV1pFEA8UUBYdRl4KCw0QWBZvRFlWFwoXWgQLDERK</div><div>2017-04-08 10:57:52.627738 I [1081/1183] TVRecEvent channelutil.cpp:1976 (GetIPTVTuningData) - Loaded [data]<a href="http://ok2.se:8000/live/">http://ok2.se:8000/live/</a><username>/<password>/170.m3u8[fectype][fec0][fec1] for 3330</div><div>2017-04-08 10:57:52.634286 I [1081/7703] StreamHandler recorders/hlsstreamhandler.cpp:122 (run) - HLSSH(<a href="http://ok2.se:8000/live/">http://ok2.se:8000/live/</a><username>/<password>/170.m3u8(0)): run() -- begin</div><div>2017-04-08 10:57:52.653838 N [1081/1081] CoreContext autoexpire.cpp:264 (CalcParams) - AutoExpire: CalcParams(): Max required Free Space: 2.0 GB w/freq: 14 min</div><div>2017-04-08 10:57:52.687498 N [1081/1183] TVRecEvent recordinginfo.cpp:687 (ApplyRecordRecGroupChange) - ApplyRecordRecGroupChange: LiveTV to LiveTV (2)</div><div>2017-04-08 10:57:52.919353 I [1081/7703] StreamHandler mythsingledownload.cpp:75 (DownloadURL) - <a href="http://ok2.se:8000/live/">http://ok2.se:8000/live/</a><username>/<password>/170.m3u8 -> <a href="http://199.66.91.82:8000/live/">http://199.66.91.82:8000/live/</a><username>/<password>/170.m3u8?token=GBFRWBVfEAoaAw5XAQIEA1NUBQRVAFFRUlZXBwEHBwIGUFwLX1IFAAsWGhBGQhNRUAlsDAFGXgZTABgSR0ZVRzxaXRtcFQMBDQ0DEBkUFV1cARFfVUhGRw1UFgoQBwkDVgQbFURSSkRdRlhTWWkFUUcNUABHXgpCCFwYEl1bb1EGXlhXAhUIEggWGhBcRREWC0ZwCggHBUQQEHdRUFlVFSBcVFQTWVtTWUBfXVtFQXh9JxFJRwYNQxZRQFUQDxIEVgIKG0oVUV9NWkJATBRbFmQ3EUlHARxDAV5HWV1bEg9BXgpMXhUeElFHaUBQRRVGVAVeABdGXhVUEhgSX1RIagBcV1cDVEZZV1pFEA8UUBYdRl4KCw0QWBZvRFlWFwoXWgQLDERK</div><div>2017-04-08 10:57:54.886229 I [1081/7711] HLSPlaylist mythsingledownload.cpp:75 (DownloadURL) - <a href="http://ok2.se:8000/live/">http://ok2.se:8000/live/</a><username>/<password>/170.m3u8 -> <a href="http://199.66.91.82:8000/live/">http://199.66.91.82:8000/live/</a><username>/<password>/170.m3u8?token=GBFRWBVfEAoaAw5XAQIEA1NUBQRVAFFRUlZXBwEHBwIGUFwLX1IFAAsWGhBGQhNRUAlsDAFGXgZTABgSR0ZVRzxaXRtcFQMBDQ0DEBkUFV1cARFfVUhGRw1UFgoQBwkDVgQbFURSSkRdRlhTWWkFUUcNUABHXgpCCFwYEl1bb1EGXlhXAhUIEggWGhBcRREWC0ZwCggHBUQQEHdRUFlVFSBcVFQTWVtTWUBfXVtFQXh9JxFJRwYNQxZRQFUQDxIEVgIKG0oVUV9NWkJATBRbFmQ3EUlHARxDAV5HWV1bEg9BXgpMXhUeElFHaUBQRRVGVAVeABdGXhVUEhgSX1RIagBcV1cDVEZZV1pFEA8UUBYdRl4KCw0QWBZvRFlWFwoXWgQLDERK</div><div>2017-04-08 10:57:57.717032 I [1081/1183] TVRecEvent tv_rec.cpp:1073 (HandleStateChange) - TVRec[3]: Changing from WatchingLiveTV to None</div><div>2017-04-08 10:57:57.720581 E [1081/1183] TVRecEvent tv_rec.cpp:1786 (GetStartChannel) - TVRec[0]: Problem finding starting channel, setting to default of '3'.</div><div>2017-04-08 10:57:58.099864 I [1081/7703] thread_unknown recorders/hlsstreamhandler.cpp:221 (run) - HLSSH(<a href="http://ok2.se:8000/live/">http://ok2.se:8000/live/</a><username>/<password>/170.m3u8(0)): run() -- done</div><div>2017-04-08 10:57:58.113559 I [1081/1183] TVRecEvent mythsingledownload.cpp:110 (Cancel) - MythSingleDownload: Aborting download</div><div>2017-04-08 10:57:58.123714 I [1081/7698] MythSocketThread(69) mainserver.cpp:7629 (connectionClosed) - Playback sock(561f560cd4b0) 'Divo' disconnected</div><div>2017-04-08 10:57:58.124131 I [1081/7695] MythSocketThread(64) mainserver.cpp:7629 (connectionClosed) - Monitor sock(561f560d0bb0) 'Divo' disconnected</div></div><div><br></div><div>It appears to be downloading the m3u8 file, but not parsing/processing the contents. Is this a scenario that mythtv doesn't support? Is there a way to make this work? Any ideas?</div><div><br></div><div>*In full disclosure, I did modify <span style="color:rgb(0,0,0);white-space:pre-wrap">httptsstreamhandler.cpp to handle URL </span><font color="#000000"><span style="white-space:pre-wrap">redirects because the source providers initial format URL redirected to another URL. For details on that: </span></font><a href="http://lists.mythtv.org/pipermail/mythtv-users/2016-June/387549.html">http://lists.mythtv.org/pipermail/mythtv-users/2016-June/387549.html</a></div><div><br></div><div>Thanks in advance!</div></div>