Skip to content
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

[Bug] "The media could not be loaded, either because the server or network failed or because the format is not supported." #2260

Closed
akasaka99 opened this issue Jul 18, 2021 · 14 comments
Labels
bug Something isn't working help wanted Extra attention is needed module:player Impacts the video player of Invidious research-needed

Comments

@akasaka99
Copy link

Hi-

  1. I'm on a Mac (Mojave 10.14)
  2. Using Firefox, Chrome, Brave & Safari
  3. Tried all the invidious instances available
  4. Removed adblockers as per some post recommendation.
    But I keep on getting 80% of the time error message:
    "The media could not be loaded, either because the server or network failed or because the format is not supported."
    and the the video wont play. Not sure what the issue is?
@akasaka99 akasaka99 added the bug Something isn't working label Jul 18, 2021
@unixfox
Copy link
Member

unixfox commented Jul 18, 2021

Please post the video ID and the instance used.

@tomasodehnal
Copy link

I have the same issue on a private instance. Example video ID is NkRkuI0ZgX0. In the browser developer console, I can see repeating 403 requests to https://r4---sn-n02xgoxufvg3-2gbl.googlevideo.com/videoplayback. I'll be glad to help in identifying the cause.

@SamantazFox
Copy link
Member

Please read the following FAQ question:
https://github.com/iv-org/documentation/blob/master/FAQ.md#q-the-media-could-not-be-loaded

Does any of the solutions listed here solve your issue?

@SamantazFox SamantazFox added the module:player Impacts the video player of Invidious label Aug 30, 2021
@akasaka99
Copy link
Author

No it did not solve the issue, the issue is more or less the same with any instance.
You can't watch 3 videos in without having buffering issues or error messages, so I gave up on invidious as it's not stable as it is right now.

@tomasodehnal
Copy link

@SamantazFox Thanks for the link. I'm not sure if I tried a video with the issue on a public instance, but I tried reloading the page multiple times and it never helped. As for DRM, today I tried to load like 50 videos, most of them music clips, but didn't find a single one that doesn't work (including the one I mentioned earlier).
I'm not sure how exactly Google distributes the load and if my private instance could be selectively blocked on some videos only, but today all works fine.

@SamantazFox
Copy link
Member

No it did not solve the issue, the issue is more or less the same with any instance.
You can't watch 3 videos in without having buffering issues or error messages, so I gave up on invidious as it's not stable as it is right now.

@asddsaz Sorry to hear that. We're trying our best, but Google is making things difficult for us!

@SamantazFox Thanks for the link. I'm not sure if I tried a video with the issue on a public instance, but I tried reloading the page multiple times and it never helped. As for DRM, today I tried to load like 50 videos, most of them music clips, but didn't find a single one that doesn't work (including the one I mentioned earlier).
I'm not sure how exactly Google distributes the load and if my private instance could be selectively blocked on some videos only, but today all works fine.

@tomasodehnal You're welcome! In theory, the recent PRs should have fixed most of the "instance is likely blocked" issues, but there may be some other factors or edge cases we're not aware of.

@SamantazFox SamantazFox added the help wanted Extra attention is needed label Oct 20, 2021
@FelipeResende
Copy link

Hi, I had the same issue and the FAQ solutions didn't work for me. Looking into syslog, I saw that invidious crashed but without any information in the stack trace. Then, I rebuilt invidious without "--release" to see where it crashed, but the error didn't occur again and I could watch the video.

So, it might be a workaround, but I'm not sure what is the impact of running it without building with --release.

@SamantazFox
Copy link
Member

Hi, I had the same issue and the FAQ solutions didn't work for me. Looking into syslog, I saw that invidious crashed but without any information in the stack trace. Then, I rebuilt invidious without "--release" to see where it crashed, but the error didn't occur again and I could watch the video.

So, it might be a workaround, but I'm not sure what is the impact of running it without building with --release.

There is currently a bug that causes recurrent crashes of invidious. See #2471

@unixfox
Copy link
Member

unixfox commented Apr 17, 2022

Closing in favor of #602 and #2850

This issue is likely going to be somewhat fixed in #3011

Please also read about this issue in the documentation: https://github.com/iv-org/documentation/blob/master/docs/faq.md#q-the-media-could-not-be-loaded

@unixfox unixfox closed this as completed Apr 17, 2022
@Turab
Copy link

Turab commented Oct 27, 2023

I know it has been quite a time since this issue is being talked and that some fixes are published over time, but I have experienced this today with the latest release and the problem seems to continue on some deployment scenarios. I haven't seen this mentioned before anywhere, so I am sharing my solution to this old discussion for the googler.

As you know, dash option is actually auto-proxying the video in the instance, disregarding "local: false" setting. So this means the video needs to be proxied from your domain. When I inspected with dev tools, I saw that invidious is trying to fetch the video from the instance on port 3000 which is the default container port of invidious. But this will cause "the media could not be loaded" error if you are behind a proxy (like I am). Because in this case, 3000 port is not exposed to public which your instance trying to reach but instead, your proxy is actually proxying the host's 80 or 443 port to internal 3000 port of the container. Therefore you need to tell invidious to fetch from the http proxy instead of internal port.

The solution is simple. Just edit your container's environment variable which is named "INVIDIOUS_CONFIG" and add two settings: "external_port: 443" (or 80 if you are not using SSL) and "domain: your.instance.domain". Example:

INVIDIOUS_CONFIG="channel_threads: 1\ncheck_tables: true\nfeed_threads: 1\nexternal_port: 443\ndomain: your.instance.domain"

You can also edit your config.yml file to do it in a more readable format but I prefer ENV vars.

@unixfox
Copy link
Member

unixfox commented Oct 27, 2023

That's exactly what is documented here: https://docs.invidious.io/installation/#post-install-configuration ....

@Turab
Copy link

Turab commented Oct 27, 2023

Not actually. The options, what they are used for and the reverse proxy case is explained and well documented there BUT it nowhere mentions that what we are discussing here, "The media could not be loaded" error is in any way related to those settings and that it can be resolved by setting them.

Maybe you can say "well if you are behind a reverse proxy, it shouldn't be needed to mention it since you are already supposed to follow reverse proxy case instructions"; but then here is the thing: even without those settings present, invidious can be successfully deployed and it works!

Consider an average user deploying invidious without a problem. Then they test it and everything works. They can watch videos on their instance. They will never know they should have set reverse proxy specific settings. They might not even know they are behind a reverse proxy because standart deploying just works!

Then they decide to switch quality to dash. That's when they will see "The media could not be loaded" error and they won't know the cause and they will google the error string and won't see anyone mentioning this can be caused by lack of reverse proxy settings.

As you said, reverse proxy case is documented there but as you see, including this issue we are commenting under, none of the similar issues mention that this might caused by lack of reverse proxy settings. You have previous comments under this very issue trying to help the OP; but even you haven't told them that there is this possibility that this error could be caused by this.

P.S: Please don't take my words bad, I just noted it down for people searching this error. Thank you for your time.

@Shahin-rmz
Copy link

Hello, I got same problem and I can not watch videos on my instance.
any idea how to solve the problem?
Thanks

@unixfox
Copy link
Member

unixfox commented Sep 25, 2024

#4947

@iv-org iv-org locked and limited conversation to collaborators Sep 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed module:player Impacts the video player of Invidious research-needed
Projects
Status: Done
Development

No branches or pull requests

8 participants