base64 encoded m3u/xmltv
Added by P M over 6 years ago
Hi. Is there a way to input a url into the IPTV Automatic Network URL field?
I have an m3u/xmltv combination that has a base64 encoded response that gets decoded in most programs including wget, kodi and python requests.get.
I can see it is base64 as the response in Firefox/Web Developer/Network debugging.
I'm using
HTS Tvheadend 4.2.3-20 ~ LibreELEC Tvh-addon v8.2.112
My workaround is to download the files with wget in a cron job and point to the local file://storage/channels.m3u8 file.
Replies (4)
RE: base64 encoded m3u/xmltv - Added by Robert Cameron over 6 years ago
Yes, the IPTV Automatic Network has a field for "URL" when you create the network. It is in that location that you put the URL to your m3u playlist itemizing your muxes.
Do beware, though, that Tvheadend will periodically check the URL of the m3u playlist to check it for updates. If the URL of any of the items in the playlist changes, Tvheadend will remove the mux associated the changed item. Also, the new items in the playlist (or any changed items) will need to be re-scanned for services, and the services will need to be remapped to channels. I am unaware of any way to disable the checking for playlist updates in Tvheadend.
For your XMLTV file, you can use a simple script which masquerades as a grabber from the XMLTV project to download your guide data as an Internal XMLTV grabber in Tvheadend. For a reference, take a look at: https://github.com/nurtext/tv_grab_file_synology/tree/master/src/remote
RE: base64 encoded m3u/xmltv - Added by P M over 6 years ago
Thanks.
The problem is that the m3u file from the server has its contents base64 encoded.
wget or Kodi or most programs that deal with m3u files decode it automatically back to a normal m3u file.
TVHeadend doesn't for some reason.
The url has a query string at the end but I don't think that is the problem.
The url response header is:
HTTP/1.1 200 OK
Server: nginx
Content-Type: audio/mpegurl
Transfer-Encoding: chunked
Cache-Control: no-cache, private
Date: Tue, 24 Apr 2018 17:04:52 GMT
The response payload is an m3u8 file encoded as base64.
It must be some kind of mpegurl standard but I hadn't come across it before.
RE: base64 encoded m3u/xmltv - Added by Robert Cameron over 6 years ago
Technically, M3U8 playlist files are simply M3U playlists guaranteed to be UTF-8 encoded. In practice, however, they usually signify an HLS stream, which is generally a playlist defining small segments (usually ~2s, but it could be any length). Tvheadend does not natively support HLS.
To use an M3U playlist as he source for an IPTV Automatic Network, each entry in the playlist must point to a stream containing a MPEG-TS container. Your M3U cannot point to additional playlists.
RE: base64 encoded m3u/xmltv - Added by P M over 6 years ago
I'm starting to think the base64 encoding is a spurious anomaly from Firefox as I checked the raw tcp packets in Wireshark and they look un-encoded.
The playlist works fine when I download it first.
TVHeadend pulls in all the streams and matches them fine with the xmltv channels.
The only other obvious question is whether TVHeadend deals with query strings properly.
The url looks something like this:
http://somewhere/get?username=USER&password=PASS&format=ts&type=m3u8