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

VLC on the Raspberry Pi 4 (64-bit) playing YouTube freezes and buffers after 1-7s with an ffmpeg error. #96

Open
JustAnEric opened this issue Dec 10, 2023 · 11 comments

Comments

@JustAnEric
Copy link

JustAnEric commented Dec 10, 2023

VLC log:

pi@raspberrypi:~ $ vlc https://www.youtube.com/watch?v=sl09B87-SAY

VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b)
[00000055acac37f0] main interface error: no suitable interface module
[00000055ac9dc560] main libvlc error: interface "globalhotkeys,none" initialization failed
[00000055ac9dc560] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00000055acac37f0] skins2 interface error: cannot initialize OSFactory
[00000055acac37f0] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.20 Vetinari
Command Line Interface initialized. Type `help' for help.
> [0000007f8c358000] lua stream error: Couldn't descramble YouTube throttling URL parameter: data transfer will get throttled
[0000007f78003420] gles2 generic error: parent window not available
[0000007f78003420] xcb generic error: window not available
[0000007f78001cc0] mmal_xsplitter vout display: Try drm
[0000007f78003420] drm_vout generic: <<< OpenDrmVout: Fmt=DPV0
[0000007f78003420] drm_vout generic error: Failed to get xlease
[0000007f8c627430] avcodec decoder: Using DRM Video Accel for hardware decoding
[0000007f98006050] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 1000 ms)
[0000007f98006050] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 1216 ms)
[0000007f8c627430] main decoder error: buffer deadlock prevented
[0000007f98006050] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 1397 ms)
[0000007f8c627430] main decoder error: Timestamp conversion failed for 12133333: no reference clock
[0000007f8c627430] main decoder error: Could not convert timestamp 0 for FFmpeg
[0000007f98006050] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 1901 ms)
[0000007f8c627430] main decoder error: buffer deadlock prevented
^C[00000055acac37f0] [cli] lua interface error: Error loading script /usr/lib/aarch64-linux-gnu/vlc/lua/intf/cli.luac: lua/intf/modules/host.lua:286: Interrupted.
[0000007f8c3d85f0] main tls client error: connection error: Resource temporarily unavailable
[0000007f8c3d85f0] gnutls tls client error: TLS handshake error: Error in the push function.
[0000007f8c3d85f0] main tls client error: TLS session handshake error
[0000007f8c3d85f0] main tls client error: connection error: Network is unreachable
[h264_v4l2m2m @ 0x7f8c651780] Failed to get coded packet: err=-1094995529

I am on the latest version of VLC, and trying to play a 1080p (HD) video from YouTube.
The main error codes when VLC freezes are 0000007f98006050 and 0000007f8c627430 and 0000007f8c627430

@jc-kynesim
Copy link

Yeah - as far as I can tell google deliberately throttles the stream s.t. it underruns and dies (VLC isn't a browser that can display ads). I recommend that you download the stream using something like yt-dlp and then play that with VLC.

@JustAnEric
Copy link
Author

JustAnEric commented Dec 12, 2023

@jc-kynesim Alright, thanks! I will definitely try that out.
But I think yt-dlp even died from YouTube throttling, as last time I tried downloading a video from YouTube, it failed with an uploader-id error.

Edit: looks like it is so.
image

@ghost
Copy link

ghost commented Dec 26, 2023

This is not a bug. Youtube itself blocks any third party requests coming from apps other than its own official app for playback and basically just limits the throughput to those ip addresses which ends up in buffering issues. There are some tricks that people came up with to get around it but it is cumbersome. So vlc for youtube not recommended.

@JustAnEric
Copy link
Author

@sudo-splinter-cell And it is really annoying that YouTube does this.

@popcornmix
Copy link

Kodi's youtube addon works without buffering (it uses some of the tricks to avoid throttling).

@JustAnEric
Copy link
Author

@popcornmix It uses an API key.

@ghost
Copy link

ghost commented Jan 4, 2024

I suggest Freetube.

https://freetubeapp.io/

This is what i use to play youtube videos on my Pi-5. It works perfectly. And you can subscribe to channels and even backup your subscriptions, indepentend from the Youtube api. Don't even need a google account.

@JustAnEric
Copy link
Author

@sudo-splinter-cell Yeah I tried FreeTube. But I tried it on my Raspberry Pi 4. It keeps buffering at 720p and higher.

@ghost
Copy link

ghost commented Jan 6, 2024

@sudo-splinter-cell Yeah I tried FreeTube. But I tried it on my Raspberry Pi 4. It keeps buffering at 720p and higher.

On RPI-4, you need to select "legacy codecs" in player settings because rpi 4 is not powerful enough for dash format. 60fps videos will suffer. If you upgrade to Rpi 5, you can go with dash 1080 and even 60fps.

@JustAnEric
Copy link
Author

@sudo-splinter-cell Where can I find the Player Settings for FreeTube?

@ghost
Copy link

ghost commented Jan 25, 2024

@sudo-splinter-cell Where can I find the Player Settings for FreeTube?

Seriously? There is a button on the left column with "settings" written on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants