To save energy and bandwidth with yt-dlp (or youtube-dl), I use the following line in my mpv configuration file located at ~/.config/mpv/mpv.conf
:
Code: Select all
ytdl-format="bestvideo[height<=?720][fps<=?30][vcodec!~='vp0?9']+bestaudio/best"
Unlike a large TV screen, I find that a PC monitor doesn't necessarily need to play heavier VP9 YouTube videos above 720p. Smaller AV1 alternatives are sufficient.
However, the issue is that by avoiding VP9 videos, mpv often cannot play any lighter alternative of a video encoded in AV1, giving this error message:
Code: Select all
[ffmpeg/video] av1: Your platform doesn't support hardware accelerated AV1 decoding.
[ffmpeg/video] av1: Failed to get pixel format.
Error while decoding frame!
[ffmpeg/video] av1: Missing Sequence Header.
Error while decoding frame!
(in the terminal, press 'Ctrl+c' to stop the repeating message and return to the prompt)
The truth is that this is not a hardware issue but a software one. It's simply that our version of ffmpeg does not support AV1 decoding.
Possible solutions:
1. As seen here: https://stackoverflow.com/a/70829069 we can install a ffmpeg build with support of an AV1 decoder such as libdav1d
. Available at: https://johnvansickle.com/ffmpeg/
or:
2. As stated here: https://trac.ffmpeg.org/wiki/Compilatio ... u#libdav1d we can install libdav1d-dev
and configure ffmpeg with:
Code: Select all
--enable-libdav1d