Hacking YouTube into my Channels DVR

As of v2025.08.27.1520 of Streaming Library Manager for Channels, there is now a complete YouTube integration available for Channels DVR!

In other words, just the same as getting Stream Links/Files for Movies and TV Shows, users can now search for and bookmark/subscribe to Videos and Video Channels (including seeing most recent releases from subscribed Video Channels). Details like titles, duration, release date, thumbnail images, and more are passed into Channels and are available in the web and the clients. Watch the video above to get an overview and read in more detail on the SLM Wiki.

Additional and expanded functionality will be added in the future. In the meantime, enjoy, and be sure to provide any feedback!

4 Likes

This is great.

It would be pretty cool to see this applied to the new Movie Extras feature. Allowing you to apply a YouTube video to a movie as a specific extra type.

1 Like

It should be technically possible assuming some directory shenanigans can talk to each other. In other words, if the movie video file is in one place, but the extras (following the pattern and naming convention) are in another, would Channels be able to merge them together? Or would SLM have to deposit these types of files into the same directory structure with the movie?

More importantly, though, you guys need to fix a ffmpeg issue on Apple clients, first, before this would work at all. See my email from 2025-03-17 (Novel Stream File approach, works on Android, fails on Apple) for those details.

2 Likes

Yeah...strm files only works with Infuse on ios/tvos. FFMPEG needs to be fixed on those platforms @maddox

Oh, I assumed this new YouTube functionality downloaded the video to a file? Does it just make it a stream link, or strm file (what would the URL be for the strm file for a YouTube video?)

It makes a .strm file with a URL like this:

http://10.255.1.144:7901/playlists/streams/stream?url=https://www.youtube.com/watch?v=vD03E54HIIU

That address belongs to SLM; it's calling an internal SLM functionality to produce a m3u8 or mp4 on the fly. More details here.

Would it be possible to send a symlink of the stream to the directory in Channels?

So then SLM is resolving the stream, and returning the data?

You’re burying the lede here!

2 Likes

I use it in custom m3u channels to bring YT Live feeds into Channels DVR

#EXTM3U
#EXTINF:-1 channel-id="UNTV" tvg-id="UNTV" channel-number="3780" tvg-chno="3780" tvc-guide-stationid="64823" tvg-name="United Nations TV" tvc-guide-title="United Nations - LIVE" tvc-guide-description="Watch UNTV live" tvc-guide-art="https://i.ytimg.com/vi/wfAa1GiNdgM/maxresdefault.jpg?v=6403083b" tvg-logo="https://i.ytimg.com/vi/wfAa1GiNdgM/maxresdefault.jpg?v=6403083b",UN TV
http://192.168.1.4:9001/playlists/streams/stream?url=https://www.youtube.com/@unitednations/live

Yes, that's a fairly good way of describing what's happening. SLM is generally not storing anything, though, just acting as more a handshake intermediary from the client to the source video. Didn't want to get too technical here, but this is a bit from the logs to give an idea:

2025-08-27 19:03:00.271874:  INFO: Extraction successful for https://www.youtube.com/watch?v=vD03E54HIIU.
2025-08-27 19:03:00.272842:  INFO: Found 10 formats.
2025-08-27 19:03:00.272842:  INFO: Best format URL found using m3u8: https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1756357381/ei/pY6vaIXjBtvBy_sP3_aukA0/ip/108.34.251.146/id/bc3d37139e072085/itag/96/source/youtube/requiressl/yes/ratebypass/yes/pfa/1/sgoap/clen%3D1839938%3Bdur%3D113.638%3Bgir%3Dyes%3Bitag%3D140%3Blmt%3D1756108039461250/sgovp/clen%3D52523316%3Bdur%3D113.600%3Bgir%3Dyes%3Bitag%3D137%3Blmt%3D1756108045204118/rqh/1/hls_chunk_host/rr7---sn-8xgp1vo-cvne.googlevideo.com/xpc/EgVo2aDSNQ%3D%3D/met/1756335781,/mh/6l/mm/31,29/mn/sn-8xgp1vo-cvne,sn-8xgp1vo-xfgl/ms/au,rdu/mv/m/mvi/7/pl/17/rms/au,au/initcwndbps/4381250/bui/AY1jyLPxrOP4quqQIfFuMxDmqNkzZVPyUMyVHFBgF2IMz_dsVxWh0OJuCr99jhFgGMZi3CnSlTHhgmZx/spc/l3OVKftBI1cBEl4-aCn9K-q-P9iAj7YognpaKeIgahyvKDyFwVZkfbWey4aaCP0NS8jn6IPOCkLvkQ/vprv/1/playlist_type/CLEAN/dover/11/txp/6309224/mt/1756335290/fvip/4/keepalive/yes/fexp/51355912,51552689,51565116,51565682,51580968/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,pfa,sgoap,sgovp,rqh,xpc,bui,spc,vprv,playlist_type/sig/AJfQdSswRAIgeu4mX7_HWAI2-mNEcHUYBbxsHImJ6Ab4cdpRxeLFUnICIEIjICEvwemiczDUoXYj9W3KOL8JUIq55zu44tEUKriu/lsparams/hls_chunk_host,met,mh,mm,mn,ms,mv,mvi,pl,rms,initcwndbps/lsig/APaTxxMwRAIgQSIshkPW8luzb3ArUHjJrKLmhKWjIfvnHg1cUXsnlLICIBKsTVMuUinZoOJL7Q6hRM92BqymwZpohm7v23DtmRBN/playlist/index.m3u8

That "best format" is what's being served up, and that is determined each time your launch the content from the link in the Stream File.

This is a different functionality called Streaming Stations. For YouTube, it uses parts of the same code, but it functions quite differently because of how Channels works. The stream resolves on the server first and then serves it to the clients, so there is no issue like with Stream Files that connect directly from the clients to sources without going through the server.

I'm not clear what you're getting at here? Or does what I said above change what you are asking?

You said it can produce an MP4 on the fly. I was curious if a symlink could be used within a movie folder in channels pointing to the generated stream link. For example, could I link to a trailer on YouTube for one of my movies by symlinking it into the movies folder? I understand that is not a feature of SLM, just curious if it would work with the link.

Ah, I see, it's a misunderstanding. SLM produces a strm file. The link within that file may eventually resolve to a mp4, but hardly ever, if at all, for YouTube. It's more a backup worst case scenario after trying everything else. I don't know what would happen if a strm file were in a non-imports directory or if Channels can recognize it based on naming alone even if they are in different directories. Whatever you put in the "Video Name" field is the file name, so you could certainly try and see what happens! However, I believe we are descibing an Apple only feature, and that will be an issue right now. This is basically what @maddox was getting to above. For once, Android is ahead of the curve on a feature!

2 Likes

Ok, I understand. I thought you had some neat yt-dlp trick going on. Thank you for explaining.

Well, I wouldn't say I don't... :stuck_out_tongue_winking_eye:

LMAO. It is neat for sure... Great job and thank you for the hard work.

1 Like

Some of my Playlists are very long :stuck_out_tongue_closed_eyes: