Skip to main content
Topic: Massive MPV CPU Usage on AVC1 - Regression. (Read 389 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Massive MPV CPU Usage on AVC1 - Regression.

Update:

MPV while playing online content with "get_video?id=" uses massive CPU amount, Getting the same video for offline view via wget makes smooth VAAPi, low CPU playback. Same with python script (we don't talk about) for youtube playback.  Very high CPU usage while mpv/smplayer plays online stream (check if you set up everything correctly in smplayer gui via "shift+i" while playing the video).

Online mpv= extreme ghigh cpu usage
Offline mpv = uses vaapi (same AVC1 720p, 25fps video).

Regression of mpv ? Any ideas?


P.S. Quick check: it doesn't happen while playing https flac radio stream. Low CPU. 1% spike for some linearization from time to time and that's it. Doesn't spike even over time. Only video.

Re: Massive MPV CPU Usage on AVC1 - Regression.

Reply #1
It's a glibc regression. See some upstream issues:
glibc
mpv

 

Re: Massive MPV CPU Usage on AVC1 - Regression.

Reply #2
Got fixed today with glibc update. It affected multiple packages/software, not only mpv. MPV jemalloc trick worked, but as I had said glibc malloc affected mulitple packages. (guess openbsd guys were 100%right  about "code correctness", they use jemallock; btw. Linus was also right "do not break user space with updates"- this is why he fired one of system dev- it broke kernel...).

Not to pollute forum, but I have to say it: I strongly believe that if someone has absolutely no idea how something works, he should, under no circumstances, touch it.

One more thing:

Its very weired that when you play online video with direct (get_video?id=) mp4 link (whithout any python scripts) via mpv it takes twice more CPU than playing it directly form HDD while its still being downloaded via wget.

Wget with PFS and no cache parameters takes 0.3% to tops 2% of CPU (oscillates about 1% mostly) while downloading this video file. If you added it to mpv vaapi it should still be reatively low CPU usage (tops 2% more CPU usage).

When you play this file directly via mpv and let it itself "stream/download" this file it takes twice more CPU, while still playing via VAAPi.

Can you explain this?