Anyone Using HLSTube?

There are a handful of YouTube live feeds that I like to drop in on from time to time. HLSTube gives me a feed that I can set up as a virtual channel which makes it a lot more convenient to check in from time to time. Little annoying thing I've come across is it usually takes two tries to tune to the channel. The first attempt fails with the same error just about every time. Has anyone else experienced this or found a way around it? Log below.

2022/04/05 09:49:42.511111 [ERR] Could not start stream for M3U-NASASPACEFLIGHT ch998 NASASpaceflight: M3U: get http://192.168.86.199:8282/_/https://www.youtube.com/watch?v=mhJRzQsLZGg: 403 Forbidden
2022/04/05 09:49:52.309965 [M3U] stream timestamps: 998: start_at=2022-04-05T09:49:20-04:00 current_at=2022-04-05T09:49:44-04:00 end_at=2022-04-05T09:49:48-04:00
2022/04/05 09:49:52.310037 [TNR] Opened connection to M3U-NASASPACEFLIGHT for ch998 NASASpaceflight

I think you mean HLSTube, not "histube"? You may want to change your title if others are trying to search for the same issue, and re-categorize to "Custom Channels".

I've only played around with HLSTube a little bit, but it seems like it is parsing the YouTube stream with youtube-dl and re-hosting it locally so that Channels DVR can play it back. While it works pretty well and is recommended by our great devs, I think the more Channels-friendly way to tune to YouTube streams is to redirect the DVR to the stream URL hosted by Google. I've found that it's faster and more consistent.

If you're comfortable with a command line and using youtube-dl directly, you can set up a cron job and use "youtube-dl -g" to write to a local m3u8 file located somewhere on your machine/network, then point your DVR to it. I set my jobs to run every 4-5 hours in order to grab a new URL, since I've found that YouTube stream m3u8 URLs usually expire after 6 hours. I think accessing streams this way allows Channels to tune to them the fastest, but it's a bit of a pain editing a bunch of cron jobs if you like to make and get rid of channels often.

If you'd rather stay with the docker route, which is cleaner to manage, you can run youtube-dl-api-server in a container. liveproxy, streamdemand are similar.

3 Likes

Thanks for the response and the heads up about my typo. I will look into your suggestions.

Yes I have experienced this (and believe I even posted about it here awhile back when I was first learning how to use hlstube.) I’ve just gotten into the habit of trying these channels twice knowing it’ll only properly “tune in” on the second try. I’d love if there was an easier, more elegant solution. I’ll check the suggestions above but they seem a lot more complicated. I was hoping Channels DVR could be updated to give more time to tune into the hlstube streams before erroring out.

I’ve been trying to reproduce this issue for the last hour or so and can’t do it. I’m on the the latest prerelease and bata iOS app. Maybe the ever seeing devs have smiled on us.

Hey @psperry, hlstube dev here! If you run into this again, would you mind sharing the logs from your hlstube container in a new issue over on GitHub? I've seen this a few times myself but am having trouble reproducing right now, but I'm sure we can get this figured out. Sign in to GitHub · GitHub Thanks!

2 Likes

I certainly will. It seems to a lot more rare than it used to be. It used to be nearly every time. Wondering if the Channels devs did something to mitigate. It did happen once this morning but my logs only seem to go hack an hour. I will open a ticket when it happens again.

Caught it and saved the logs. Will submit a ticket in the morning.

EDIT: Posted

I need some instructions on how to install hlstube on Docker on Synology NAS. Can you help?

I believe I just secure shelled (ssh) to my Synology NAS, then executed this line as copied from https://github.com/jnewland/hlstube.

docker run --rm -i -p 8080:8080 ghcr.io/jnewland/hlstube:latest

If you already have something using port 8080, then you would want to change it to something else.

1 Like

I did what @cyoungers did, only a bit different.
I use the :main image as it's newer than the :latest image Package hlstube · GitHub

I run the container detached instead of interactive and don't want it removed when stopped docker run | Docker Documentation
so I use

docker run --detach --restart=unless-stopped --name=hlstube --env TZ=America/Los_Angeles -p 8080:8080/tcp ghcr.io/jnewland/hlstube:main
3 Likes

Anyone using HLSTube get interrupted recordings with this error?
Transcoder Reset: Playlist skipped to a higher sequence

Recording one hour segments of a live feed on avg. 15 times per week I get them randomly, maybe one out of 20+ recordings. The interruptions so far have caused a loss of anywhere from 20 seconds to a couple minutes of program material in the recording.

Reported it when first encountered and here's what I was told

I.m pretty sure HLSTube only caches the master.m3u8 for five hours.
Maybe @jnewland has seen this or has some idea of what's causnig it.

HLSTube continues to work very well for me with a large number of webcams and live streams.

I can't get this LAX Live stream working though, and I think it's because there are two camera feeds to switch between? I'm only interested in camera #1 though. Can HLSTube work with this kind of YouTube link?

CleanShot 2022-11-12 at 08.50.29

I was never able to get HLSTube to work on the LAX live stream YT feed. Also figured it must be the two feeds that foul things but for HSLTube. So I had to use youtube-dl to create the m3u8 lines required in the m3u for a source.

youtube-dl -g https://www.youtube.com/watch?v=t0GrpAgdBFI

I built a Keyboard Maestro macro that runs every 4 hours to regenerate the output from the youtube-dl -g command. I setup a separate source defined in Channels DVR pointing to this updated m3u file just for this feed.

2 Likes

I spoke too soon, perhaps I jinxed something? :frowning: I got warnings about my iMac server's hard drive dying so I cloned everything to a new bootable drive. Everything is working fine... except for hlstube, which is no longer working. I have it installed and running using Docker Desktop. But now when I try to watch the same streams that used to work fine, I'm only getting "could not fetch playlist: 500 internal server error" in Channels DVR.

Here is the log output from hsltube:

I was just trying stream from Twit.tv:

http://x.x.x.x:8383/_/https://www.twitch.tv/twit

Or this Santa Monica WebCam:

http://x.x.x.x:8383/_/https://www.youtube.com/watch?v=PfDDEVBgvWM

These previously worked fine. I feel like I'm missing something obvious but don't know what to try to troubleshoot. Any tips, tricks or help appreciated!

EDIT TO ADD, 3/23: I did a reinstall on a new Mac and got Docker Desktop and hlstube working again.

1 Like

Not sure if @jnewland is still updating hlstube
It quit working for me today due to an outdated version of yt-dlp in the container and just shows retyring... in the log,
Running the version of yt-dlp interactively in the container errors out with
"Unable to extract uploader id"

$ yt-dlp -U                                                                                       
Latest version: 2023.02.17, Current version: 2022.02.04                                                             
ERROR: It looks like you installed yt-dlp with a package manager, pip or setup.py; Use that to update               

$ yt-dlp -g 'https://www.youtube.com/watch?v=9Auq9mYxFEE'                                         
WARNING: [youtube] Ignoring subtitle tracks found in the HLS manifest; if any subtitle tracks are missing, please re
port this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confir
m you are on the latest version using -U                                                                            
ERROR: [youtube] 9Auq9mYxFEE: Unable to extract uploader id; please report this issue on  https://github.com/yt-dlp/
yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U; plea
se report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. C
onfirm you are on the latest version using -U                                                                       

The latest version of yt-dlp works, but how to get that in the hlstube container?

I download the latest standalone linux version from GitHub - yt-dlp/yt-dlp: A youtube-dl fork with additional features and fixes
Did a chmod 755 on it and copied it over the old one in the container using docker cp.
docker cp yt-dlp_linux hlstube:/usr/local/bin/yt-dlp
It works now (until I replace the container).

$ yt-dlp -U                                                                                       
Latest version: 2023.02.17, Current version: 2023.02.17                                                             
yt-dlp is up to date (2023.02.17)                                                                                   

Mine is jacked up as well. I tried going to the docker page and its gone. Could you upload yours with the fix maybe? That would be awesome :slight_smile:

Not sure what you mean. I can see them Package hlstube · GitHub
Unless you mean your container was deleted?
That will happen if you use the default run command using the --rm option.
Here's the run command I use instead.

docker run --detach --restart=unless-stopped --name=hlstube --env TZ=America/Los_Angeles -p 8080:8080/tcp ghcr.io/jnewland/hlstube:latest

There's nothing to upload. I just replaced the executable in the container with the new one I downloaded.
See docker cp | Docker Documentation

Updated to use tag :latest instead of :main in the example docker run command

1 Like

Hey folks! :slight_smile: I just released ghcr.io/jnewland/hlstube:v0.0.7 with the latest version of yt-dlp. Please let me know if you run into any trouble with it!

4 Likes

Thank You!
Back to working great, as usual :smile: