Usage ‐ SLM ‐ Bookmarked Programs ‐ Special Actions ‐ SLM Streams - babsonnexus/stream-link-manager-for-channels GitHub Wiki
WARNING: Currently, the direct-play SLM Stream feature only works in the Channels DVR Android/Google TV clients, other client players like Infuse, and third-party tools like VLC. There is a bug in the Channels DVR Apple TV client that must be resolved by the Devs there for this to function properly. If you are using a different media player client that accepts Stream Files but this feature does not work, you will have to reach out to the developers of those tools in order to make a fix there, as well. That said, there are options to get "Stream Links" instead of "Stream Files", so you can take advantage of all of the remainder of the SLM Stream capabilities. More details are covered below.
Click the video to watch at https://www.youtube.com/watch?v=6_pZkAb6Pfs
Among some video hosting sites, SLM has the ability to turn their programs into content that can be consumed natively by different applications, notably the Channels DVR, Infuse, and similar client internal players.
Example of a YouTube video in the Channels DVR client for Android TV
Example of a Twitch Video in the Channels DVR client for Android TV
This is known as a "SLM Stream" and in Special Action, you can select Make SLM Stream in order to take advantage of this feature.
All that is necessary is to put a link to the program in the Video Link field (Stream Link/File Override for Movies and TV Show Episodes) and make this selection.
This works with a variety providers including YouTube, Twitch, Daily Motion, and more! A theoretical list of possible services is available here, however your mileage may vary. Streaming Library Manager provides no guarantee that any specific one will work. At this time, this solution is only available for providers who have freely and openly available content that is accessible through a webpage, not PVOD (i.e., Netflix, Disney+, Hulu, Max, Paramount+, Amazon Prime, etc...). More so, the content cannot have DRM protections enabled. That said, there may be specialized ways to get a specific service working with additional settings, as discussed below. More so, if you have a use case and believe a method can be found to make it work, please submit an Issue request.
Some examples (and certainly not limited to) of potential video links are:
- YouTube:
https://www.youtube.com/watch?v=Ke6XX8FHOHM - Twitch:
https://www.twitch.tv/videos/2403823983 - Daily Motion:
https://www.dailymotion.com/video/x6rjc8u
For items like these, there are also additional overrides available both at the program level and per individual episode/video. For videos and TV Show episodes in particular, there is functionality to import metadata like its title, duration, and more and control how the program looks inside clients like Channels DVR that have that integration available. On top of this, even before creating a SLM Stream, you can test the link ahead of time by using PLM Streaming Stations and selecting the Live Streams (HLS) option. If that does not work, try it with Live Streams (MPEG-TS) instead. If this is successful, there is a way to make sure SLM Streams uses that method, as covered further down.
More so, it is also possible to bookmark videos and even "channels" from these video providers directly and have all of these steps done automatically for you. Details are available here and here.
In order for SLM Streams to function correctly, it's important to understand how it works. What this does is create a Stream File (.strm) and point that file back at SLM. This is unlike Streaming Stations which calls the activity on the server, thus allowing it to be directed to locations like localhost. When dealing with a Stream File, though, the client looks to consume it directly. That means that the address it is pointed to must be one that the client itself can understand. In other words, if you had the link pointed to localhost, the client would try to resolve to itself. As such, in Manage Providers, you must set a valid SLM Stream Address.
When you first installed/upgraded an attempt was made to determine your host machine's IP address and port used, but may not have found it correctly. For instance, if you see something like http://172.24.0.2:5000, that is most likely looking within a Docker container and needs to be modified. It is up to you to set this to the right value that will work with the client. The clients cannot read local machine names or internal Docker addresses, but have no issue going to specific IP addresses. One way to test this is to try to access Streaming Library Manager using the host server's IP address from another device on network (i.e., another computer, a tablet, your phone). Should you be successful, that is what the client will need as well. With that, though, this would only work when streaming at home. If you want to stream while away from home, you would need to have some type of Tailscale, VPN, or open to the internet situation where your copy of Streaming Library Manager was exposed to an address you could access while not on your home network. Again, this is totally up to you to manage and get an acceptable value.
NOTE: For Channels DVR users, like all Stream Files, these SLM Streams only work on clients and not in the web interface. However, you can use the 'VLC links' option, and it will work in there. If you are receiving error messages in VLC, please see this solution. You will need to add the line for the http protocol.
As previously discussed, there are actually two potential engines for SLM Streams, which are referred to as the "HLS" and "MPEG-TS" options. The "HLS" one is the default and will always be used unless you take action to force a change to the "MPEG-TS" choice. This is accomplished by searching for a pattern that can be found in a URL, and wherever that is discovered it will switch the output in the resulting Stream File.
At the time of this writing, YouTube has been identified as broken with the default method, so switching to that secondary method is necessary. As such, a pattern of youtu will capture any type of YouTube link and move it from the default HLS to the MPEG-TS way. Should in the future this be unnecessary, the pattern can be easily removed. After doing so, the Stream Files need to be regenerated, but that can take place during normal automation routines. Similarly, any and all other patterns can be added here. It is up to you to decide which, if any, providers you want to use this function with. Per the discussion above, you will want to test which method works best for your provider.
YouTube, though, as a company is the most aggressive in targeting the tools necessary for these capabilities to work. Due to this, a "Special Treatment" is also available for these videos.
A selection of Default (Normal) will run the creation of the Stream File process as discussed throughout this page. However, by choosing one of the other options, YouTube video links will be created as a "Stream Link" instead of a "Stream File", using the format schema as described. Certain apps and systems prefer slightly different ones, so this gives you various methods to choose from.
Besides working around YouTube's attempts to stop SLM Stream capabilities, this may also be desirable in other situations, like if you are remote and do not have access to the internal SLM Stream functionality and want to still view this content. Similarly, you may desire to have better integration with things like YouTube by using their native apps or other apps that can play their content, such as SmartTube. Either way, in the end, you will still have all the other capacities of SLM Streams while getting Stream Links with no manual intervention.