Cannot play YouTube videos on VLC
- Login o registrati per inviare commenti
Let's pick a YouTube Video, this one for instance:
Check Out Trisquel GNU / Linux Libre - YouTube
https://www.youtube.com/watch?v=s7L7ZNYNTdw
How to watch it on VLC? In theory, in the VLC that we get installed by default with Aramo, we just have to copy the address, then open VLC and do one of this:
-Click on "Multimedia -> Open Network Stream" , paste the address in the dialog box, then click on "Play" or hit Intro.
-Hit Ctrl+V, paste the address in the dialog box, then click on "Play" or hit Intro.
However, both ways get me an error: VLC is not able to open the MRL https://www.youtube.com/get_video_info?video_id=s7L7ZNYNTdw&jsurl=https%3A%2F%2Fwww.youtube.com%2Fs%2Fplayer%2F0b866fa6%2Fplayer_ias.vflset%2Fgl_ES%2Fbase.js
I have already tried some fixes:
-Open Preferences, in the dialog box go to the lower left corner and select "Show Settings: All", in "Input/Codecs -> Access modules -> HTTPS" untick Cookies forwarding. No change.
-Download the youtube.luac file and replace it. Change: VLC still cannot open the MRL, but now the MRL is a lot longer.
Any help welcome. Kind regards, Ignacio Agulló.
Minitube fails to work as well.
Youtube Downloader fails as well.
Haruna Video Player fails as well.
The recent methods I've tried for getting videos from that site (such as entering URLs into the video player) either didn't work at all or are quite unreliable, the only successful methods I have for getting videos from there are:
* the half-working Invidious instance at https://inv.nadeko.net (which allows getting videos despite the low reliability as "You"Tube does what it can to block more ethical means of accessing the videos posted there, also that instance can't access age-restricted videos)
* GNU Guix's version of yt-dlp. Other versions, such as Trisquel 11 (Aramo)'s default version, and also the one in aramo-backports, seemed unable to successfuly extract videos from that unfriendly website, although Guix's version actually works for me, some of the time (not perfectly, some videos won't download the first time, also downloading age-restricted videos through yt-dlp seems to be barred by "You"tube by default, though on the bright side with Guix's version of yt-dlp I've found it possible to download videos through Tor by passing yt-dlp to the "torsocks" command, so this way you can proxy videos without Invidious). After downloading the video with yt-dlp, you can play it with vlc, though if the video feels stuttery try downloading a lower resolution version of the video so your computer can deal with it better. Though keep in mind Guix's package manager is big package manager, it can coexist with apt but it will download its own packages, so installing Guix's package manager just so you can have their version of yt-dlp might be overkill, so I recommend trying the Invidious solution first
https://trisquel.info/en/wiki/gnu-guix-package-manager
https://packages.guix.gnu.org/packages/yt-dlp/2024.12.23/
Sorry if my answer sounds desperate, if I remember correctly in the past it was much easier to get videos from "You"tube but nowadays there seems to be much fewer methods left, so trying to access videos through e.g. vlc has become much harder. It's sad, with only very recent programs such as Guix's version of yt-dlp being able to do the job, and you shouldn't expect Guix's version to work forever due to how strongly "You"tube works to banish these means of getting videos.
Thank you Kiki, that was fast.
Invidious seems to be working for now. So there is still a way to watch videos from YouTube by using ethical technology... as long as YouTube doesn't come up with a way to frustrate it. The old game of cat and mouse.
Sadly, that isn't good enough for me. What I am trying to watch is a video with audio out of sync. VLC allows to correct sync delays, but Invidious does not. So, it seems that I would need to download the video from YouTube first... which seems even more difficult. I will create a separate thread for that.
Kind regards, Ignacio Agulló.
>"What I am trying to watch is a video with audio out of sync. VLC allows to correct sync delays, but Invidious does not."
mpv will allow you to adjust audio delay so you can better sync up audio and video.
Ctrl-Shift-+ Increases audio delay by 0.1s.
Ctrl-- Decreases audio delay by 0.1s.[1]
mpv uses yt-dlp to download and play youtube/invidious videos. Be sure to use the Trisquel backports version of yt-dlp. Or, the yt-dlp project recommends you download the nightly version[2], which you could do like so, using today's nightly download as an example:
cd Downloads/
wget https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/download/2025.01.12.232754/yt-dlp_linux
chmod +x yt-dlp_linux
sudo ln -sf /home/[USER]/Downloads/yt-dlp_linux /usr/bin/yt-dlp
Make sure yt-dlp is up-to-date:
yt-dlp -U
Find a video you want to watch using your favorite invidious instance, and put the url for that video in mpv:
mpv https://inv.nadeko.net/watch?v=_aonE0V9DYE
Then use Ctrl-Shift-+ or Ctrl-- to adjust the audio delay.
[1] https://en.linuxadictos.com/mpv-cheat-sheet-with-keyboard-shortcuts-that-will-turn-you-into-a-playback-ninja.html
[2] https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#update
Thank you, andyprough. I encountered an error; I copy it here:
ignacio@Ignacio-P35-DS3L:~/Descargas$ mpv https://inv.nadeko.net/watch?v=s7L7ZNYNTdw [ytdl_hook] ERROR: [generic] Unable to download webpage: HTTP Error 500: Internal Server Error (caused by ); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U [ytdl_hook] youtube-dl failed: unexpected error occurred Failed to recognize file format. Exiting... (Errors when loading file)
What is your output from
mpv --version
It should give you version numbers for mpv, ffmpeg, and for several of the ffmpeg libraries.
Here's mine - if you have lower version numbers, you may need to upgrade some packages:
$ mpv --version
mpv 0.34.1 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
built on UNKNOWN
FFmpeg library versions:
libavutil 56.70.100
libavcodec 58.134.100
libavformat 58.76.100
libswscale 5.9.100
libavfilter 7.110.100
libswresample 3.9.100
FFmpeg version: 4.4.2-0ubuntu0.22.04.1
Thanks again, andyprough. I checked the numbers carefully and my output is exactly the same as yours.
Looks like youtube is doing some geoblocking. I just tried
mpv https://inv.nadeko.net/watch?v=s7L7ZNYNTdw
using a United States IP address, and I got the same 'HTTP Error 500' that you did.
However, I then used a vpn and changed it to a central European IP address, and the same mpv command has played the video.
I've heard that youtube has used geoblocking against invidious in the past, but this is the most clear example I've seen of it in action.
Well, I went for it.
First I uninstalled the package yt-dlp present at my Aramo. That uninstalled the package youtube-dl too.
Then I installed Guix. The process was simple, but still took a few hours. Then I installed yt-dlp by introducing the command "guix install yt-dlp".
Finally, I tried the tool yt-dlp to download a video and this is what happened: the download begins, but after around a minute, a 403 error appears. yt-dlp has the ability to resume downloads, so in theory by retrying one could make progress towards completing the download. However, after the error appears any further attempts will encounter the same error instantly, so resuming will fail with no advance at all, as if hitting against a wall. I sought for a short video of 63 seconds and tried to download it, but again the error happened around 88% of the download, so I couldn't even download a one-minute-long video. This is the output:
ignacio@Ignacio-P35-DS3L:~$ yt-dlp https://inv.nadeko.net/watch?v=eY96502qYUA [generic] Extracting URL: https://inv.nadeko.net/watch?v=eY96502qYUA [generic] watch?v=eY96502qYUA: Downloading webpage WARNING: [generic] Falling back on generic information extractor [generic] watch?v=eY96502qYUA: Extracting information [youtube] Extracting URL: https://www.youtube.com/watch?v=eY96502qYUA [youtube] eY96502qYUA: Downloading webpage [youtube] eY96502qYUA: Downloading ios player API JSON [youtube] eY96502qYUA: Downloading mweb player API JSON [youtube] eY96502qYUA: Downloading m3u8 information [info] eY96502qYUA: Downloading 1 format(s): 137+251 [download] Destination: Praia das Furnas [eY96502qYUA].f137.mp4 [download] 88.3% of 32.90MiB at 424.74KiB/s ETA 00:09ERROR: unable to download video data: HTTP Error 403: Forbidden
I would try clearing the cache by running: yt-dlp --rm-cache-dir
Thank you, prospero. I tried that, but nothing changed. These three commands are the download attempt before clearing, the clearing itself, and the attempt after clearing:
ignacio@Ignacio-P35-DS3L:~$ yt-dlp https://inv.nadeko.net/watch?v=eY96502qYUA [generic] Extracting URL: https://inv.nadeko.net/watch?v=eY96502qYUA [generic] watch?v=eY96502qYUA: Downloading webpage ERROR: [generic] Unable to download webpage: HTTP Error 500: Internal Server Error (caused by ) ignacio@Ignacio-P35-DS3L:~$ yt-dlp --rm-cache-dir Removing cache dir /home/ignacio/.cache/yt-dlp ... ignacio@Ignacio-P35-DS3L:~$ yt-dlp https://inv.nadeko.net/watch?v=eY96502qYUA [generic] Extracting URL: https://inv.nadeko.net/watch?v=eY96502qYUA [generic] watch?v=eY96502qYUA: Downloading webpage WARNING: [generic] Falling back on generic information extractor [generic] watch?v=eY96502qYUA: Extracting information [youtube] Extracting URL: https://www.youtube.com/watch?v=eY96502qYUA [youtube] eY96502qYUA: Downloading webpage [youtube] eY96502qYUA: Downloading ios player API JSON [youtube] eY96502qYUA: Downloading mweb player API JSON [youtube] eY96502qYUA: Downloading player 6e1dd460 [youtube] eY96502qYUA: Downloading m3u8 information [info] eY96502qYUA: Downloading 1 format(s): 137+251 [download] Resuming download at byte 30475650 ERROR: unable to download video data: HTTP Error 403: Forbidden
https://nickvision.org/parabolic.html is easy-to-use (once the URL copied, click the "+" button, then "OK", then "Download" (although you may first choose a different format/resolution) and finally the play button in the list of "Completed" downloads... but, today, it does not work. I believe it was working yesterday. Parabolic relies on yt-dlp. I believe a new Flatpak is made whenever yt-dlp is updated, fighting against Google's blocking. For the moment though, I get no new version with the following command:
$ flatpak update
I now got the update: Parabolic works again! :-)
To install Flatpak, setup Flathub's "floss" subset and install Parabolic, execute in a terminal:
$ sudo apt install flatpak
$ flatpak remote-add --subset=floss flathub https://flathub.org/repo/flathub.flatpakrepo
$ flatpak install flathub org.nickvision.tubeconverter
Notice that the "floss" subset includes some free software that only aims to launch proprietary software!
Thank you, Magic Banana. I suppose this message was intended for the other thread, wasn't it?
No, it was not. I have decided to always post messages by pair, the second message only linking to the one right before, to reinforce it.
(I am obviously joking.)
See https://trisquel.info/forum/cannot-play-youtube-videos-vlc#comment-178573
(Am I actually joking?)
Now that you reinforce it, cache clearing seems like a better move.
In fact, it may be necessary to clear the cache twice, so it is better to recommend it twice than to recommend to do it twice, else users may think the second line is redundant and skip it.
In fact, it may be necessary to clear the cache twice, so it is better to recommend it twice than to recommend to do it twice, else users may think the second line is redundant and skip it.
You said clear the cache twice twice. Do you want us to clear the cache four times?
You said clear the cache twice twice. Do you want us to clear the cache four times?
You said clear the cache twice twice. Do you want us to clear the cache four times?
You said clear the cache twice twice. Do you want us to clear the cache four times?
Clear the cache and do https://trisquel.info/forum/cannot-play-youtube-videos-vlc#comment-178611
Clear the cache and do https://trisquel.info/forum/cannot-play-youtube-videos-vlc#comment-178610
Okay, this thread has reached a conclusion.
The objective was to watch a YouTube video while being able to fix the out-of-sync audio. I explored two methods in two different threads, receiving help in both and reporting the outcome I got. There was a bit of a mix, as sometimes help for one method would appear on the other thread – so, I am posting this final report on both threads.
Method: Connecting to YouTube from a media player that allows to fix the sync, such as VLC or mpv.
Thread: ‘Cannot play YouTube videos on VLC’
URL: https://trisquel.info/es/forum/cannot-play-youtube-videos-vlc
Conclusion:
i) Invidious at address https://inv.nadeko.net/ offers a Libre way to watch YouTube videos. It suffices to replace ‘https://www.youtube.com/watch?v=’ with ‘https://inv.nadeko.net/watch?v=’ to watch the same video in Invidious.
ii) No way found for VLC to play videos from either YouTube or Invidious, it reports not being able to open the MRL.
iii) mpv sometimes plays videos from both YouTube and Invidious. 74 hours earlier ago it reported ‘HTTP Error 500: Internal Server Error’, yet at present it plays videos from both sites… a weather report for this would be useful.
Method: Downloading the video from YouTube, then play it with a media player that allows to fix the sync, such as VLC or mpv.
Thread: ‘Cannot download YouTube videos in Aramo’
URL: https://trisquel.info/es/forum/cannot-download-youtube-videos-aramo
Conclusion:
i) No way found for Trisquel’s YouTube Downloader app to work.
ii) Not a single one from the 35 Abrowser extensions available at Mozzarrella that in theory allow for downloading videos from YouTube appears to work. Seems that YouTube has changed its service and made all of them obsolete. I could have missed something but not 35 times.
iii) Tool yt-dlp works, but not the current versions for Aramo (2022.04.08-1, ‘Unable to extract uploader id’) and Guix (2024.12.23, seems to be capped, for after downloading some megabytes it gets error ‘403: Forbidden’ and further attempts get the same error immediately and make no progress). The version that works is the one you get when you enable the Trisquel backports repository (2024.09.27-1~bpo22.04.1). Also, it works with YouTube addresses but not with Invidious ones.
iv) Magic Banana mentions that Parabolic also works. This is the only solution that I have not tried and cannot confirm. See comment https://trisquel.info/es/forum/cannot-play-youtube-videos-vlc#comment-178546 . You are warned, you might feel the urge to repost the same link again – many did already.
Many thanks to users Kiki_the_Cyber_Squarrel, andyprough, prospero, Magic Banana, Avron, knife, Ark74, iShareFreedom and eric23 for their help. If I forget someone, my excuses.