It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Video game presentations are quite flashy, but still a good way to get a first impression.
I see two problems:

1. By default, quality is set to the highest value. I don't need 1080 HQ video and have to set quality for each and every video manually, this is annoying and time wasting.
2. Also, I really hate forced captions and want to watch YT video game presentations without captions by default.
Post edited 19 hours ago by johan-2
avatar
johan-2:
Please, consider viewing YouTube videos via yt-dlp (coupled with your media player of choice, such as: mpv).

While completing tasks, I will often have a video playing in one of the corners of the screen; so, there is no need to waste resources on decoding high-definition video. I tend to request something akin to the following (with the vertical resolution of the source video limited to a maximum of 360 pixels):
mpv --ytdl-format='bestvideo[height<=?360]+bestaudio' https://www.youtube.com/watch?v=IIIIIIIIIII
avatar
johan-2:
avatar
Palestine: Please, consider viewing YouTube videos via yt-dlp (coupled with your media player of choice, such as: mpv).

While completing tasks, I will often have a video playing in one of the corners of the screen; so, there is no need to waste resources on decoding high-definition video. I tend to request something akin to the following (with the vertical resolution of the source video limited to a maximum of 360 pixels):

mpv --ytdl-format='bestvideo[height<=?360]+bestaudio' https://www.youtube.com/watch?v=IIIIIIIIIII
avatar
Palestine:
Wow, I never thought to get such an awesome answer.
I use mpv, updated yt-dlp but can't get any video (eg. https://www.youtube.com/watch?v=ADBH1EgCud0) to play:
```
[build_webm] Lua error: [string "~/.config/mpv/scripts/build-webm.lua"]:1: attempt to index a nil value
[ytdl_hook] ERROR: [youtube] ADBH1EgCud0: Unable to extract uploader id; 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)
```
if I try to play with mpv LINK instead I get:
```
Authorization required, but no authorization protocol specified
[vo/gpu] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/opengl] Failed to set up VT switcher. Terminal switching will be unavailable.
_amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
amdgpu: amdgpu_device_initialize failed.
_amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
amdgpu: amdgpu_device_initialize failed.
[vo/gpu] Failed to commit ModeSetting atomic request (-13)
[vo/gpu/opengl] Failed to set CRTC for connector 126: Permission denied
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[vo/sdl] SDL_Init failed
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Error opening/initializing the selected video_out (--vo) device.
Video: no video
```
this is YT, probably I would need an account on YT to get it working.
Post edited 18 hours ago by johan-2
avatar
johan-2:
For the provided YouTube link ('God of War' Trailer), there should be no need to provide log-in/sign-in credentials, as it is not an age-restricted (nor subscriber-only) video (and plays correctly on the Linux-based devices that I had tested). Anyway, the supplied error messages suggest that the source of the problem resides elsewhere.

Is there a particular reason for the inclusion of 'build-webm.lua' within your "$HOME/.config/mpv/scripts" directory?
Also, which windowing system are you using (X, Wayland-based, or none at all: directly rendered within the framebuffer)?

Uncertain of which Linux distribution you are using, but, unfortunately, yt-dlp ultimately depends upon a fair number of Python components, and, in my experience, if the versions of any of these are not synchronized with that of the others, one can expect issues to develop (eventually). Not only is this vital, but, quite frequently, yt-dlp itself becomes out-of-date (due to alterations made by Google).
Post edited 12 hours ago by Palestine
yt-dlp changes regularly due to the youtube backend changing so often. You can't rely on your distribution's packaged yt-dlp to be up to date. Also, it's likely that you will need a Javascript engine installed to use yt-dlp reliably.

The full instructions are on the yt-dlp github but the tl-dr is:

1. Install yt-dlp using pip (I recommend --user to install locally not systemwide)

python -m pip install --upgrade --user --pre "yt-dlp[default]"

1b. Verify the locally installed yt-dlp is in the path:

which yt-dlp

(should be something in your home directory, e.g. ~/.local/bin/yt-dlp )

1c. Test mpv again. This should be enough to work for some videos, and for other videos you will get better error messages (probably about javascript).

2. Install javascript dependencies:

pip install --upgrade --user yt-dlp-ejs

2b. Install a javascript engine (deno is recommended by yt-dlp).

There are other dependencies like ffmpeg and ffprobe but if you are using mpv these should already be installed.

Finally:
If this works for you then remember to upgrade using (1.) every time yt-dlp inevitably breaks due to youtube changing the backend.
Post edited 6 hours ago by lupineshadow
avatar
lupineshadow: pip
Another method is to download their executable directly from its official github page, if you prefer a "safer" way.

Just something important to add:

Youtube is trying practically every week to block people from using other means of watching their videos.
From creating obfuscation to directly blocking IPs that do not access their site outside of its official domain or official apps.

I use yt-dlp and PipePipe to both watch and download videos.
It's not uncommon for Youtube to simply "stop working".

If you will download videos to stream it through mpv, I recommend using a safe/no-logs VPN.