An easy way for Channels DVR to watch YouTube Live vids

Should this livestream work? It has some special ascii characters in the title. Maybe it is puking on that. Also the description is super long. The error is Could not fetch playlist: kister.net...

:red_circle:LIVE Plane Spotting at Los Angeles International Airport (LAX) - YouTube

That's not a livestream anymore, it's a recording. The Kister Method only works with YouTube live videos.

Thanks for bringing this up. I've been having HLSTube issues for weeks and hadn't thought much about it, but setting up the Kister Method seems to have alleviated all of that!

That said, one of thing I liked with the HLSTube method was naming the stations and giving them custom logos. Is there any way to do that with the Kister method?

JP_ScreenShot_2023_08_16_$(hh}_20_35
Example Comparing HLSTube vs. Kister Stations

1 Like

hmm. not yet. it would get messy passing in data like that though because the extra data would have to be URL encoded. e.g spaces would have to be %20 and slashes %2F

so instead of grabbing the logo from the youtube stream, you'd want to specify a logo & tv-guide name on the URL like:
https://kister.net/mpl/yt2m3u8?v=@ai-peter,tvg-name=Family%20 Guy,logo=wherever.com%2Fyourimage.jpg

?

EDIT: edited just about everything

Yeah, something like that could work, except I think we'd also need to be able to do the logos like tvg-logo=%2Fdvr%2Fuploads%2F107%2Fcontent to use the uploaded images (not sure if we'd have to have the double quotes around that or not).

If you feel like going more/less crazy, the ability to add any valid m3u tag as a comma separated list could work just fine, too. For instance, instead of the custom variable ph=3600, just let users add tvc-guide-placeholders=3600.

ok so that's hooked in. not too well tested so if LMK if anyone who's been using this for a while has sudden weird issues with the guide.

I changed the channel names, so they're not the crazy yt2m3u8-8KGXSjtS5pk on the guide screen -- it now detects it from youtube.

it also allows much tags to be specified as comma-separated parameters that will override default behavior:

channel-id
channel-number
tvg-logo
tvg-name
tvc-guide-title
tvc-guide-description
tvc-guide-art
tvc-guide-tags
tvc-guide-genres
tvc-guide-categories
tvc-guide-placeholders
tvc-guide-stationid

each one also has a two or thee letter alias (so the url doesnt have to get too long). they're predictable, like channel-id = ci, channel-number = cn, tvc-guide-genres = tgg.

there's also a special logos tag that will set both tvg-logo and tvc-guide-art to the same value.

remember these parameters need to be url encoded. He has a URL Encoding Functions thing where you can paste a regular string and it gives you back the encoded.

you can get unexpected results duplicating channel-number and channel-id. don't do that.

https://kister.net/mpl/yt2m3u8?v=rxBBRLWF0mM,tn=My%20own%20guide%20name,tgl=https%3A%2F%2Ftinyurl.com%2Fzw9bd6mp

4 Likes

Cool, where would that be? On the TV client or in the web admin? I've already seen proper channel names on AppleTV in the guide. But where I'd really like to see them is in the web admin, in the Source channel listing:

and also in the Channel Collections page:

I also just refreshed the M3U, but don't see any changes. Am I looking in the wrong place?

odd, my source channel listing shows the new fancy names. I tried one of yours too:

maybe some sort of caching issue somewhere??? sounds lame but i'd give it a day.

or maybe create a new Source just for testing for a minute-- use the same URL (but different channel-numbers).... if they all show up right on your testing Source then it's just caching something somewhere and will probably auto-fix.

Yep, I didn't change anything, but when my m3u update ran it looks like it got some new names:

image

However, note the one at the bottom. Looks like the Live Stream went down at some point so it returned a "field", I guess?

My first test worked beautifully!

I put in one stream with an hourly guide, a name override, a guide title override, and a locally uploaded logo:

https://kister.net/mpl/yt2m3u8?v=@KittenAcademy,ph=3600,tvg-name=It's%20a%20Kitty%20Test,tvc-guide-title=Kitty%20Guide%20Test,tvg-logo=%2Fdvr%2Fuploads%2F102%2Fcontent

Everything came out exactly as expected and the station played normally:

image

image

I'll do some more messing around later and get things set up with a bunch of streams; I'll let you know if I run into any issues. So far, though, couldn't be happier!

As you can see, I didn't really try this, but I'm the type of coder who prefers long names, anyway. If there any limit to the tags that can be used?

1 Like

Okay, I did some more testing and had a blast getting things looking good. I ran into no issues whatsoever and even made my life a lot easier by creating a spreadsheet to put together the entire link for me.

Expand to see test results...

image

Click here to download an Excel spreadsheet to generate your own massively long Kister link...

1 Like

I made a bug while making code to account for the tvg-name being blank. heh. fixed.

no specific limits but there are two issues with all the data, #1 is eventually the url will be too long for the webserver to understand. #2 is adding too many &v= parameters will make Channels time out getting the data because my code takes too long to answer. but then a retry will work.

That's pretty cool. You scripted my script to script.

1 Like

Do you know how many characters that is? I could do something in the Excel to cut off and create a second link if that is the case. Also, I suppose I should get over myself and use the shortened tags if I want to limit the number of characters! :stuck_out_tongue_closed_eyes:

Do you know how many that is, as well? I could do something about that, too.

I have come to realize I have been waaaaay overthinking this!

I took a look at the m3u8 your website generated and I realized I could just put the same text directly in Channels. For instance, this is now my Custom Station lineup (mixing Kister/YouTube and other streaming stations):

#EXTM3U

#EXTINF:-1 channel-id="Cust80000" tvg-chno="80000" tvg-id="" tvg-name="" tvg-language="" tvg-logo="/dvr/uploads/102/content" tvg-country="US" tvg-url="" group-title="Animals",Providence Peregrine Live Stream
https://asori-hls.streamguys1.com/asori/live-500/chunks.m3u8

#EXTINF:-1 channel-id="Kister81000" channel-number="81000" tvc-guide-art="/dvr/uploads/103/content" tvc-guide-description="Enjoy the antics of rescued southern sea otters as they romp, tumble and wrestle live (7 a.m.-7 p.m. Pacific time) from the Monterey Bay Aquarium's Sea Otter Exhibit. Watch them participate in fun enrichment activities with artificial kelp, ice and other toys—it all helps keep them healthy and stimu" tvc-guide-placeholders="7200" tvc-guide-title="Live Sea Otter Cam - Monterey Bay Aquarium" tvg-logo="/dvr/uploads/103/content" tvg-name="Live Sea Otter Cam - Monterey Bay Aquarium",Live Sea Otter Cam - Monterey Bay Aquarium
https://kister.net/mpl/yt2m3u8?w=hHbp9hG61CQ

#EXTINF:-1 channel-id="Kister81001" channel-number="81001" tvc-guide-art="/dvr/uploads/107/content" tvc-guide-description="Discord: https://discord.gg/dragonballai -- (OPEN A TICKET ON DISCORD AFTER YOUR DONATION) -- Donations: https://streamlabs.com/dragonball_ai/tip -- Tiktok: Tiktok.com/@dragonball_ai -- AI generated Dragonball series. Topics through discord." tvc-guide-placeholders="7200" tvc-guide-title="AI Stream - Dragon Ball" tvg-logo="/dvr/uploads/107/content" tvg-name="AI Stream - Dragon Ball",AI Stream - Dragon Ball
https://kister.net/mpl/yt2m3u8?w=@dragonball_ai

#EXTINF:-1 channel-id="Kister81002" channel-number="81002" tvc-guide-art="/dvr/uploads/108/content" tvc-guide-description="" tvc-guide-placeholders="7200" tvc-guide-title="AI Stream - Family Guy" tvg-logo="/dvr/uploads/108/content" tvg-name="AI Stream - Family Guy",AI Stream - Family Guy
https://kister.net/mpl/yt2m3u8?w=@ai-peter

#EXTINF:-1 channel-id="Kister81003" channel-number="81003" tvc-guide-art="/dvr/uploads/111/content" 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 [email protected] or tweet at us @kitten_academy.  If you want to chat with us and the other viewers, there's a 24/7 chat" tvc-guide-placeholders="7200" tvc-guide-title="Kitten Academy" tvg-logo="/dvr/uploads/111/content" tvg-name="Kitten Academy",Kitten Academy
https://kister.net/mpl/yt2m3u8?w=@KittenAcademy

I think I was just missing the obvious that I could do a Kister link with the ?w= instead of the ?v= to get the video stream directly. With that in mind, I can just use that and put in all the m3u tags that I desire directly in Channels without having to burden your website or worry about character lengths and timeouts.

Thanks for doing all that, though; it helped me figure out what was going on and how to do it myself!

2 Likes

hey @jkister thank you so much for this super awesome tool.

there's something weird going on with encodings on some videos with East Asian language titles and descriptions, shows up as gibberish in the output m3u. for example v=tD_a03trUvE

could be that the title and description are some non-unicode encoding, in this. instance maybe Big5? I wonder if there's an easy fix?

also some videos like this one have extremely long descriptions with rich text and hypertext that likely won't render well in channels app even if the encoding were fixed, is there a way to skip generating tvc-guide-description?

normally I'd just write the m3u myself and use your "w" argument, but I found a way to export YouTube playlists as csv, with a bit of processing I was hoping to use that in combination with your tool to generate very long m3us complete with titles, from YouTube playlists like this one which would be pretty cool.

The script just grabs whatever youtube has -- if there're funky characters, it just relays them to Channels. There have been other characters that don't show up quite right, we/i never put much effort figuring it out.

the script does chop it down to the first ~300 characters by default. but yeah that one's a garbled mess.

well, no description will be printed if you add the tgd=0 parameter. like
https://kister.net/mpl/yt2m3u8?v=tD_a03trUvE,tgd=0

tgd being shorthand for the full tvc-guide-description.

YMMV with very long URLs. Channels won't wait forever for my side to generate all the data, and the maximum length is 8177 characters. If it works once, it'll likely be fine.

thanks, good to know about the tgd=0 parameter. I'm just using the long url once to generate the m3u, then pasting it into channels with Source=Text.

1 Like

interestingly, adding tgd=0 fixed the decoding issue in the tvc-guide-title! so I'm golden, thanks again

1 Like

This works fantastic for me. Thanks so much for this.

1 Like

I just learned there's no more 24/7 livestream from TWiT.tv, apparently it's now only going live now when they are actually recording a new show. :frowning:

Kister Method should still work for recordings in Channels DVR though, right?

Since the stream is "offline" the icon is no longer showing. Instead we get a ALERT! icon. Can this be changed?

SCR-20231120-ptpf

I'll probably just end up removing this from the Channel Collection entirely. Replace it with a Virtual Channel of my own? Or just watch these recordings "on demand" from my library instead. Regardless, I have a feeling this means I'll ultimately be watchibg less TWiT.tv content...

Details here: Looking for Live Content?

Due to costs associated with hardware and software used to provide the TWiT live stream 24/7 to multiple streaming providers, TWiT has made the difficult decision to end its always-on live stream.

As of November 13, 2023, we will no longer stream re-runs while not doing live production. We will strive to stream on YouTube as often as possible during live production of some of our shows. If you wish to watch any pre-show setup and post-show discussions, these will now be exclusive to full Club TWiT members via our Club TWiT Discord server. (Discord access is not available with any discounted single-show subscriptions.) Hosts who choose to participate with chat will now do so via Discord.

Where does this icon come from? Since there is an option in Custom Channels to "Prefer channel logos from Guide Data" I thought maybe I could manipulate the XMLTV Guide Data file to add a custom logo. Since this XMLTV file is generated from GitHub - tmm1/ical-to-xmltv: Converts a iCal/Google Calendar Feed to an XMLTV File (to load into TVHeadend/other EPG Reader), I thought I could just add a logo to that file. Knowing virtually nothing about XMLTV, I tried to add an icon source line to the basic.xml (XMLTV) file like so and pointed it to a logo that I had TWiT-logo-square.png":

<tv xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="resources/xmltv.xsd">
  <channel id="TWiT.tv">
    <display-name>Twit Live Schedule</display-name>
     <icon src="/volume1/web/TWiT/TWiT-logo-square.png" />
  </channel>

This did nothing. I tried reloading the M3U and redownloading the XMLTV but that did not add the icon to the guide.

1 Like