Using OliveTin to Host YouTube Live Channel URLs Based on the Kister Method

A new Action has been added to OliveTin to allow conversion of Kister Method URLs into a locally hosted URL containing your specific IP address and token. These URLs can be updated at whatever frequency you desire, though 5 hours seems to be the correct interval:

screenshot-htpc6-2024.12.29-16_40_41

REQUIRED:

  • Latest Channels DVR server pre-release version for proper m3u parsing (v2024.12.27.0121 or later)
  • Latest OliveTin for Channels version (2025.01.02 or later)
  • OliveTin for Channels and Channels DVR Server must both be on the same local network

Here are the steps:

Create an M3U using the Kister Method and save it on your Portainer/Docker host in the $HOST_DIR/olivetin/data/$CHANNELS_HOST-$CHANNELS_PORT folder.

The M3U would typically look something like this:

#EXTM3U
#EXTINF:-1 channel-id="yt2m3u8-@KittenAcademy" channel-number="0.1000" tvc-guide-art="https://i.ytimg.com/vi/R7vrbiDi0Tc/maxresdefault.jpg?v=d780" tvc-guide-description="If there is nothing going on, you can rewind the stream up to 12 hours to see action. --  -- Is there something we should know about? Do you have a question for us? Email us at headmaster@kitten.academy. If you want to chat with us and the other viewers, there's a 24/7 Discord chat accessible to our suppo" tvc-guide-placeholders="false" tvc-guide-title="Kitten Academy Live Stream" tvg-logo="https://i.ytimg.com/vi/R7vrbiDi0Tc/maxresdefault.jpg?v=d780" tvg-name="Kitten Academy",Kitten Academy
https://kister.net/mpl/yt2m3u8?w=@KittenAcademy

#EXTINF:-1 channel-id="yt2m3u8-gCNeDWCI0vo" channel-number="0.1001" tvc-guide-art="https://i.ytimg.com/vi/gCNeDWCI0vo/maxresdefault.jpg?v=640a78c8" tvc-guide-description="Stay Informed: Watch Al Jazeera English Live: @Al Jazeera English,  we focus on people and events that affect people's lives. We bring topics to light that often go under-reported, listening to all sides of the story and giving a 'voice to the voiceless'. -- Reaching more than 270 million households in" tvc-guide-placeholders="false" tvc-guide-title="?? Al Jazeera English | Live" tvg-logo="https://i.ytimg.com/vi/gCNeDWCI0vo/maxresdefault.jpg?v=640a78c8" tvg-name="Al Jazeera English",Al Jazeera English
https://kister.net/mpl/yt2m3u8?w=gCNeDWCI0vo

#EXTINF:-1 channel-id="yt2m3u8-@SkyNews" channel-number="0.1002" tvc-guide-art="https://i.ytimg.com/vi/YDvsBbKfLPA/maxresdefault.jpg?v=67582ebf" tvc-guide-description="Watch Sky News live: Santa Tracker began with a child's accidental phone call to a secret US air force number ahe rest is Christmas history; The UK's oldest man has celebrated his 110th birthday with a special performance from opera singer Alfie Boe at his care home in Derbyshire; and good (and bad)" tvc-guide-placeholders="false" tvc-guide-title="Watch Sky News" tvg-logo="https://i.ytimg.com/vi/YDvsBbKfLPA/maxresdefault.jpg?v=67582ebf" tvg-name="Sky News",Sky News
https://kister.net/mpl/yt2m3u8?w=@SkyNews

For convenience name the M3U the same as the Custom Channels Source you'll be creating. The Custom Channels Source would look something like this:

Note the URL to reference the file you placed in the first step would be in the form http://PORTAINER_HOST:HOST_SFS_PORT/CHANNELS_HOST-CHANNELS_PORT/m3u_name

After that you'll want to initiate the OliveTin Action using the button referenced above. Select the CDVR server you want to use (one M3U of this type per server supported), followed by the update interval (5 hours suggested based on the YouTube tokens expiring every 6 hours). Enter the name of the Custom Channels Source and the M3U name you used to finish it off:

Click Start, and you should see output like this if successful:

The Custom Channels Source and the token will both be auto updated in the interval used:

2 Likes

Almost forgot an important credit:

@chDVRuser had the idea, and determined most of what was required to make it happen. Many thanks!

3 Likes

And Thank You for helping make this available to other Channels DVR users.

1 Like

Good point. Latest CDVR Server pre-release, and of course, the latest bnhf/olivetin required.

You can also edit that m3u file before having OliveTin use it.
Like for changing the channel number or name, artwork, placeholder length, add a gracenote station id, etc.

I recommend that if you currently have kister sources on your server that aren't working, disable them and do a Screenshot 2024-12-29 at 11-05-41 Channels Settings after adding the new OliveTin for Channels YouTube source. This will prevent channel-id and channel number conflicts.

And if that folder doesn't already exist, you can either create it manually, or run one of the OliveTin actions that will create the folder, like Generate a Channels DVR M3U Playlist

The $variables shown are from the Environment Variables section of your OliveTin stack in Portainer.
$HOST_DIR HOST_DIR=/volume1/docker
$CHANNELS_HOST CHANNELS_DVR_HOST=192.168.1.4
$CHANNELS_PORT CHANNELS_DVR_PORT=8489

Capture1

And for

PORTAINER_HOST PORTAINER_HOST=192.168.1.4
HOST_SFS_PORT HOST_SFS_PORT=8088
CHANNELS_HOST CHANNELS_DVR_HOST=192.168.1.4
CHANNELS_PORT CHANNELS_DVR_PORT=8489
m3u_name YouTubeLive.m3u

http://192.168.1.4:8088/192.168.1.4-8489/YouTubeLive.m3u

Very nice. Well done, @chDVRuser and @bnhf!

I've been watching this project even though I don't use any YouTube live channels. :laughing:

However, that may change now.
This got me curious about YouTube live channels so I will see if I find something that interests me.

Yesterday, I found a live channel in YouTube that has episodes of Mr. Bean. I may start with this one. :laughing:

2 Likes

@bnhf @chDVRuser
Excellent work!!

I’m up and running working great.
It failed the first couple tries for me so here are my tips to anyone else when setting this up.

Don’t confuse this with the port Olivetin is running on. You want to use the static file server port from the Olivetin stack.

I had some failures due to capitalization and spaces. I’d just avoid these all together when setting up the file, in the Olivetin script, and in the custom source in the dvr.

Agree 100%
I mentioned to @bnhf that would be a problem.
It's best to use the Source name and m3u file name he shows in his first post.
OliveTin does a playlist refresh for the source, but the Source name it has to use isn't exactly the same as the Source nickname you create.

For example, You create a Source nicknamed YouTube Live
"DeviceID": "M3U-YouTubeLive","FriendlyName": "YouTube Live"
"m3u.src.YouTubeLive.name": "YouTube Live"
OliveTin has to refresh the playlist using the name YouTubeLive

You create a Source nicknamed YouTube Live-OT4C
"DeviceID": "M3U-YouTubeLiveOT4C","FriendlyName": "YouTube Live-OT4C"
"m3u.src.YouTubeLiveOT4C.name": "YouTube Live-OT4C"
OliveTin has to refresh the playlist using the name YouTubeLiveOT4C

You create a Source nicknamed Jack's YouTube Live channels
"DeviceID": "M3U-JacksYouTubeLivechannels","FriendlyName": "Jack's YouTube Live channels"
"m3u.src.JacksYouTubeLivechannels.name": "Jack's YouTube Live channels"
OliveTin has to refresh the playlist using the name JacksYouTubeLivechannels

You create a Source nicknamed My "YouTube Live" channels
"DeviceID": "M3U-MyYouTubeLivechannels","FriendlyName": "My \"YouTube Live\" channels"
"m3u.src.MyYouTubeLivechannels.name": "My \"YouTube Live\" channels"
OliveTin has to refresh the playlist using the name MyYouTubeLivechannels

I'm pretty sure he only strips spaces and single quotes from the source nickname.
So I wouldn't use a source nickname with special characters.
This is going to cause failures if it doesn't refresh the source playlist.

@bnhf
Found a bug.
It's running as a background process and I kill it by using frequency: 0
The m3u file still exists with the # comment and the updated manifest url
Now I restart the action using a new frequency, like 5h
It wipes out the contents of the m3u file. Making it 0 bytes.
When this happens, Channels DVR logs this error

[ERR] Failed to parse m3u for YouTubeLive: EOF

If I replace the m3u file with the original after killing the background process and before running the action again, everything is fine.

I would recommend to make a backup copy of your original m3u file until this is fixed.

Otherwise it works fine if you don't kill it and restart it.

If the background process is running when you update OliveTin, or restart the container, it will restart the background process without issues, tested this multiple times.

Giving up on this for the night. I just tried to reproduce what I saw and wrote up and now the m3u file gets wiped (0 bytes) as soon as I kill the background process. Anyway, it's a bug.

I saw this happen once, but wasn't able to reproduce it. However, with the approach I was taking to update the M3U, I believe this happened when the process was killed in the middle of an update.

So, I've reworked the process in such a way that the M3U is never zero'd out, but is rather overwritten at the end of the update. This is more instantaneous as far as the M3U is concerned, and should be more bulletproof.

Pull :latest (:2024.12.30) when you have time to check it out. Thanks.

Thanks, looks like that fixed it.

is there a chance that youtube live channels will work again on the m3u list like in the link from kister until recently?

Not sure what you mean.
Give an example.

1 Like

https://kister.net/mpl/yt2m3u8?w=@Telewizja_Republika

This link worked for me so far.

This method works for that.


(Language translation courtesy of DeepL Translator)

Paste this link in a web browser and download the yt2m3u8.m3u8 file.
https://kister.net/mpl/yt2m3u8?v=@Telewizja_Republika,ph=3600
Then rename the yt2m3u8.m3u8 file to YouTubeLive.m3u and use that as your m3u file in this project.

I'm sorry, but I don't understand how to do it. I don't know enough about it. Could I ask you to give me a link of what it should look like now so that the TV Republika channel works on my m3u channel list?

I could be wrong but this requires the use of channels dvr. Do you have a subscription to channels dvr?

Also requires he has OliveTin for Channels running and follow the instructions in the first post.
Not as simple as the Kister Method was. But it works.