-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Hardware Decoding on MacOS #4149
Comments
Like a lot of open source projects IINA is layered on top of other projects. For audio/video playback IINA uses a library from the mpv project. The
The manual used to say:
Things are getting better, but there is a history of problems with hardware decoding. The layers involved are:
It is not just the codec that matters. Details about exactly how the video is encoded can trip up hardware decoding. When investigating hardware decoding issues lots of details matter. For this post I'm focusing just on VP9. I downloaded the YouTube video VP9 Codec Test. Playing that video with IINA 1.3.1 (which includes mpv 0.34.1 and FFmpeg 4.4.2 libraries) on my MacBookPro18,2 with the M1 chip under macOS Ventura 13.2. The mpv log file shows IINA was unable to use hardware decoding:
For this next test I modified IINA 1.3.1 to use Homebrew installed mpv 0.35.0 and FFmpeg 5.1.2. The mpv log shows hardware decoding worked:
At the time IINA 1.3.1 was built FFmpeg 5 had just been released. IINA stayed with version 4 due to concerns over regressions in the area of hardware decoding. Of note is FFmpeg ticket 9599 "VideoToolbox VP9 hwaccel freezes ffmpeg". A bit worrisome that ticket is still open. Hopefully the regressions have been fixed in in FFmpeg 5.1.2. My test above was on Apple silicon. Need to also test some Intel processors. I do see a IINA problem that needs to be fixed. FFmpeg Compilation Guide under "Additional libraries" says:
I do not see the I'll try and find some time to look into the situation with the other codecs. |
Just ran a test with the upgraded dependencies and:
VP9 hardware decoding will work in the next release of IINA. I will comment on the other formats when I get a chance. |
I'm leaving this one open for now as there is a known problem with VP9 and hardware decoding on Intel Macs and some of the other encodings are not working as well. The VP9 problem has been reported to FFmpeg. |
I'm using an Intel Mac (Ice Lake chipset), and according to Intel, my GPU supports hardware decoding of MPEG-2, VC-1, and VP9 using Quick Sync (VideoToolbox on MacOS).
Playing back H.264 and HEVC shows that VideoToolbox (hardware decoding) is being used, but playing back MPEG-2, VC-1, and VP9 says it's not using hardware decoding, and CPU usage is significantly higher, and video playback drops frames.
Any idea why hardware decoding is only working for H.264 and HEVC, but nothing else?
The text was updated successfully, but these errors were encountered: