Skip to main content
Topic: Youtube gives mpv only vp9 (Read 929 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Youtube gives mpv only vp9

Playing video:

Code: [Select]
user@host> mpv https://invidious.protokolla.fi/watch\?v=sVmI8DRmZPA                                                                                ~
 (+) Video --vid=1 (*) (vp9 1280x720 60.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
File tags:
 Uploader: DistroTube
 Channel_URL: https://www.youtube.com/channel/UCVls1GmFKf6WlTraIb_IaJg
[ffmpeg/video] vp9: No support for codec vp9 profile 0.
VO: [gpu] 1280x720 yuv420p
AO: [pulse] 192000Hz stereo 2ch float
But my configuration said not to use vp9:
Code: [Select]
# Громкость
volume=130

# Кэш
cache-secs=120

# Заголовок
title='${filename/no-ext}'

# Аппаратное ускорение
hwdec=vaapi

# Размеры
autofit=100%x75%

# Выравнивание звука
af=lavfi=[loudnorm=I=-16:TP=-1:LRA=2]

# Качество видео потока
#ytdl-format="bestvideo[height<=?1080][vcodec!=vp9]+bestaudio/best"
ytdl-format="bestvideo[height<=?720][vcodec!=vp9]+bestaudio/best"

# Субтитры
#ytdl-raw-options=sub-lang="ru",write-sub=,write-auto-sub=

Re: Youtube gives mpv only vp9

Reply #1
Subtitles are also loaded if the video is in my native language with the same configuration i.e. commented out:

Code: [Select]
user@host> mpv https://invidious.protokolla.fi/watch\?v=7MRw6UGcbcY                                                                                ~
 (+) Video --vid=1 (*) (vp9 1280x720 25.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
     Subs  --sid=1 --slang=en-US 'English (United States)' (webvtt) (external)
 (+) Subs  --sid=2 --slang=ru 'Russian' (webvtt) (external)
     Subs  --sid=3 --slang=sr 'Serbian' (webvtt) (external)
File tags:
 Uploader: RADIO TAPOK
 Channel_URL: https://www.youtube.com/channel/UCYfYQ1lmPwPdxjBpW_rMJ7w
[ffmpeg/video] vp9: No support for codec vp9 profile 0.
VO: [gpu] 1280x720 yuv420p
AO: [pulse] 192000Hz stereo 2ch float
(Paused) AV: 00:00:20 / 00:03:59 (9%) A-V:  0.000 Cache: 120s/15MB


I don't understand why this is bypassing the config

Re: Youtube gives mpv only vp9

Reply #2

I see you have in your config

Code: [Select]
ytdl-format="bestvideo[height<=?720][vcodec!=vp9]+bestaudio/best"

Idk but you can try

Code: [Select]
ytdl-format="bestvideo[height<=?720][vcodec!=vaapi]+bestaudio/best"

Just a guess though.


Re: Youtube gives mpv only vp9

Reply #3
mpv still gets vp9 which has no hardware video acceleration

Re: Youtube gives mpv only vp9

Reply #4
~/.config/yt-dlp/config:
Code: [Select]
-S "codec:h264"
now vaapi is in use:
Code: [Select]
user@host> mpv https://invidious.protokolla.fi/watch\?v=7MRw6UGcbcY                                                                                ~
 (+) Video --vid=1 (*) (h264 1280x720 25.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
     Subs  --sid=1 --slang=en-US 'English (United States)' (webvtt) (external)
 (+) Subs  --sid=2 --slang=ru 'Russian' (webvtt) (external)
     Subs  --sid=3 --slang=sr 'Serbian' (webvtt) (external)
File tags:
 Uploader: RADIO TAPOK
 Channel_URL: https://www.youtube.com/channel/UCYfYQ1lmPwPdxjBpW_rMJ7w
Using hardware decoding (vaapi).
VO: [gpu] 1280x720 vaapi[nv12]
AO: [pulse] 192000Hz stereo 2ch float
AV: 00:00:32 / 00:03:59 (13%) A-V:  0.000 Cache: 10s/1MB

vaapi seems to work, but it seems not

Re: Youtube gives mpv only vp9

Reply #5

 Strange thing happening with my mpv too while playing any video. It starts normally at around 10% cpu usage and rather fast this percentage climbs till it hits about 54-55% and this happens even if I play low resolution like 144p.

Definitely there's some conflict between packages libplacebo and glslang or I don't know what else..

Guess if I keep watching a 30-40 minutes vid I'll reach 100% cpu. These are most annoying kinda of bugs..

Re: Youtube gives mpv only vp9

Reply #6
Strange thing happening with my mpv too while playing any video. It starts normally at around 10% cpu usage and rather fast this percentage climbs till it hits about 54-55% and this happens even if I play low resolution like 144p.

Definitely there's some conflict between packages libplacebo and glslang or I don't know what else..

Guess if I keep watching a 30-40 minutes vid I'll reach 100% cpu. These are most annoying kinda of bugs..

That appears to be some bug with glibc. See the mpv issue for some more details. Strangely, I can't actually reproduce it.

Edit: here's the glibc tracker.

Re: Youtube gives mpv only vp9

Reply #7
 
 Yeah when updated glibc looked at it with a grain of salt and some bitterness as I've somehow anticipated it will mess some things. These core packages always give some errors here and there and now it was mpv turn to get screwed. Even if it's glibc fault I think there's bigger chance mpv will get around this with a fix as it seems to be the only 😵 affected pkg.

 Edit: had to modify my mpv config file like bellow so the high cpu bug goes away.
Code: [Select]
--cache=no
#--cache-on-disk=yes
#--cache-secs=20



 

Re: Youtube gives mpv only vp9

Reply #8
All fixed!