Fullscreen performance regression on OS X El Capitan
This is a regression I've noticed since upgrading from Yosemite. Drawing the OSD and progress bar are way too CPU intensive, to the point where mpv will skip frames. To illustrate it, I've recorded the screen of my old, weaker laptop:

While just playing a panning scene normally skips 2 frames, moving the mouse to trigger the OSD makes the CPU usage shoot up, where even mpv notices, skipping 98 frames. That's a worst case scenario on a Core 2 Duo, but the CPU usage is noticeable even on my newer machines.
mpv git-78caf6a, ffmpeg 2.8, OS X 10.11 15A284
OpenGL performance seems to have taken a hit (at least some aspects of it), I've also had to tone down my config since moving to 10.11 (that's on a relatively recent MB Air).
I haven't noticed anything on the OSD end, but then I don't rely on it very much. On the contrary, CPU usage seems to be down a tiny bit, but unless I tone down my opengl settings (killing deband, for instance), I get skipped frames where I never did before.
Regarding OpenGL general performances, yesterday in IRC we discovered that for some reason the --fs-black-out-screens option improve them drastically in fullscreen on 10.11, you can try it and see if it's useful in your case too.
Yes, pigoz was talking about something like a window server performance regression.
Anyway I don't think its our bug :/
At a (very) quick glance, fs-black-out-screens doesn't seem to help on my end (I'm not using any external screens, FWIW), the only thing it does is spawn an extra black mpv window that I can see in Mission Control. Speaking of Mission Control, strangely enough, the mpv thumbnail is completely smooth in there, during stuff that will skip like hell if I focus the window or go fullscreen. :?
I've noticed the full-screen performance issue after upgrading to El Capitan, very annoying. It appears often if file operations are performed like copying a bigger file or using a VM in the background. My laptop has issues with it frequently. Reverting the config does obviously not fix it. Happens on both my desktop, and my laptop, so it's clearly not a device issue.
Unfocusing the mpv window does speed it up considerably when in full-screen. It's like the issue only happens if the window is in focus. Setting --quiet on helps, but doesn't fix it. Might as well also mention that I tried a very old build of mpv and it seemed to fix it too, but I can't confirm that 100%.
Seems like the --fs-black-out-screens option does fix the full-screen issue, though that is also annoying since I have three monitors connected and often have something I'm working on in one of the other monitors, but I guess that's a good temporary fix, especially on the laptop. I assume this is something on Apple's end since it isn't fixed yet, though only mpv has this problem as far as I know(?).
The full-screen thing might not related to the issue you are having however. Haven't noticed any noticeable skips on either of the rigs with the OSD, though when you do mention it I changed the msg-level to check and the dropped frames are indeed increasing whenever the OSD is showing.
Not sure if related, but recently on Ubuntu 14.04 64bit, I've been seeing the player shoot up to a consistent full CPU usage whenever I use vo=opengl-hq or vo=opengl in the config. Before, the player would rarely breach half the cpu usage in vo=opengl-hq on most 720p h264 video on the AMD Athlon II X4 640. If I switch to vo=vdpau (no hwdec=vdpau option), the CPU usage sees not much more than around 8%.
mpv-build: From https://github.com/FFmpeg/FFmpeg 2a4d1a6..624057d master -> origin/master eca7b0d..c149a4a release/2.8 -> origin/release/2.8
From https://github.com/mpv-player/mpv 78caf6a..bddd1e9 master -> origin/master
Playback test vo=opengl: Playing: /home/green/Videos/Video Shared/screen tearing test.mp4 (+) Video --vid=1 () (h264) (+) Audio --aid=1 --alang=und () (aac) libEGL warning: DRI2: failed to authenticate [vo/opengl] Suspected software renderer or indirect context. AO: [pulse] 44100Hz stereo 2ch float VO: [opengl] 1280x720 yuv420p AV: 00:00:12 / 00:00:30 (41%) A-V: 0.000 Dropped: 126
Playback test vo=vdpau: Playing: /home/green/Videos/Video Shared/screen tearing test.mp4 (+) Video --vid=1 () (h264) (+) Audio --aid=1 --alang=und () (aac) AO: [pulse] 44100Hz stereo 2ch float VO: [vdpau] 1280x720 yuv420p [vo/vdpau] Compositing window manager detected. Assuming timing info is inaccurate. (Paused) AV: 00:00:07 / 00:00:30 (23%) A-V: 0.000
There are several factors here:
- El Crapitan has some sort of performance regression that affects us, and which
--fs-black-out-screensappears to work around - vo_opengl_hq has become much slower due to the addition of debanding (enabled by default)
- vo_opengl may have become somewhat slower due to the removal of the single-pass optimization, which can be restored with
--vo=opengl:dumb-mode=yes(but which also disables almost all other filtering)
The VO changes were both included in release 0.11.0 for the first time.
The performance regression seems to only affect full screen mode though.
FWIW, --fs-black-out-screens doesn't seem to help on my end (MB Air, no external screens).
Stupid question: What about resurrecting native-fs?
We could look into resurrecting --native-fs and see if it helps with performance.
The vo=opengl:dumb-mode=yes brings the total cpu usage down to 54%, which is still way too high. That number (54%) is about where vo=opengl-hq when debanding was enabled by default last month would take my cpu up to (~50% cpu usage then).
Am I right to think --fs-black-out-screens won't help those of us without external monitors? I should probably mention other video players (namely VLC) aren't affected by the El Capitan performance regression. I'm assuming this is because VLC uses OS X's native full screen API. Is implementing this in mpv a reasonable solution?
Edit: --native-fs is probably what I'm thinking of. First time I saw it I just assumed 'fs' stood for file system. Time to adjust my caffeine intake I guess.
We might look into implementing something like that. --fs-black-out-screens apparently helps regardless of the number of screens.
Here’s what I’ve observed, mpv-0.11, 10.11.1, 1.1 GHz 12” MacBook (so, very slow hardware). Default full screen is slow. Full screen with --fs-black-out-screens works fine. If I hit the zoom button on the titlebar (i.e. native full screen) it’s fine.
My video output is set as vo=opengl:icc-profile-auto:blend-subtitles:interpolation:scale=spline36:cscale=spline36:dscale=mitchell:pbo
My full config.
Sadly, --fs-black-out-screens still doesn't help on my end ;'(.
In case it's not clear from FrostedMint's comment, despite --native-fs having been removed some time ago, you can already get native fullscreen in 10.11 without it being resurrected, by clicking the green button on the titlebar.
On my end, both --fs-black-out-screens and native fullscreen doesn't help.
This minimal vo is enough to cause framedrop: vo=opengl:scale=spline36:interpolation
I made some more test.
I set my vo back to a demanding one: opengl-hq:scale=ewa_lanczossharp:icc-profile-auto:interpolation, and also set framedrop=decoder. The video was choppy at first but after about 5 seconds it started to play smoothly. I can see the avsync dropped to 0 and there were no more frame drop.
I then tried framedrop=no, the video was a bit slow at first, but after few seconds it suddenly speed up for a second and then started to play smoothly. The avsync also dropped to 0 at the same time.
framedrop=decoder might just not work, but the default framedrop mode should not cause any issues.