-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Livestreams unavailable on self-hosted instances #330
Comments
There was some discussion about this in the matrix server, so I thought I would copy the information here so it's easier to track. Requesting manifests from self-hosted instances returns 403. Other resources load as expected. Videos, comments, images, and other content appear to load fine. The relevant code is here, for reference: get "/api/manifest/hls_variant/*" do |env|
client = make_client(YT_URL)
manifest = client.get(env.request.path)
if manifest.status_code != 200
halt env, status_code: manifest.status_code
end
env.response.content_type = "application/x-mpegURL"
env.response.headers.add("Access-Control-Allow-Origin", "*")
host_url = make_host_url(Kemal.config.ssl || CONFIG.https_only, CONFIG.domain)
manifest = manifest.body
manifest.gsub("https://www.youtube.com", host_url)
end @tmiland, @Perflyst, and Tobi have encountered this. As far as I know (feel free to correct me here), all three instances are behind apache, using the instructions in the wiki. Requesting the resource from localhost returns as expected. The issue is likely that Apache is adding headers to the request that Invidious or YouTube is not handling correctly. |
Howdy, I'm adding my own header in Nginx, to allow embedding in FreshRSS and Nextcloud and so forth... Added support for CORS on Nginx now, to see if that fixes the error. (Found it after searching for application/x-mpegURL) Just have to wait for a live stream video to show up now 😂 |
Here is my current (fine tuned and hardened) Nginx config for Invidious:
Done various tests, and it's all good. What remains is the live video, to see if it works. 👍 |
Was this a "livestreams are working"? |
No, that remains to be seen. 🙃 |
Trying to get live video as referenced here: ##227 (comment) But looks like it's not working? 🤔 Rarely get a live video in the sub. feed. Is there any other way to debug this? |
Okay, was able to test again now, got this error:
Found this: https://video-dev.github.io/hls.js/stable/ And this: https://bugzilla.mozilla.org/show_bug.cgi?id=941351 Also did a search in "about:config" in firefox, and found "media.hls.enabled", it was set to false. Set it to true, but still same problem. Using Firefox 65 on Ubuntu 18.10. |
When accessing the manifest directly, does it return a 403? |
Is it possible that nginx is truncating the query? Trying to request something like this directly from YouTube returns 403. |
I'm getting "Secure Connection Failed" 🤔 |
It could be. I'll debug further regarding the header. From nginx error log:
From access log:
|
BAM! Took a while, but found a fix! Add this to the nginx conf location directive:
It's something about chunk sizes -> https://forum.nginx.org/read.php?2,247883,247906#msg-247906 Searched for |
I tried following with apache2
but livestreams are still not working. There is nothing like |
Tested your instance with a random live video now, and am getting a different error msg in Chromium.:
And the same as my initial error:
Are all folder and execute permissions set correctly? What does it say in your logs? Haven't used Apache for ages.... You could do Nginx with Apache though: How To Configure Nginx as a Web Server and Reverse Proxy for Apache on One Ubuntu 18.04 Server Makes life much easier in my opinion. 🙂 Here's my current working directive:
|
I'm still getting errors when trying to get livestreams on my instance despite the configuration by tmiland.
|
This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, please let us know. |
Howdy!
Got this issue with a live video just now:
Updated an hour ago from repo.
Originally posted by @tmiland in #325 (comment)
The text was updated successfully, but these errors were encountered: