Hardware decoding does not work on OS X?
Tried
mpv --hwdec=vda --vo=corevideo video.mp4
for many different H.264/MP4 files, and mpv always use software decoding. Is there anything else I need to do to enable hardware decoding?
Have you made sure those files are not 10bit? Because hardware decoding of 10bit files is not supported at the hardware / drivers level.
@pigoz No, they are regular H.264 video ripped from BluRay discs. QuickTime Player X has not problem hardware decoding them.
Make sure you are not using VDA from another application. My understanding is the Flash plugin can use VDA if you have a Safari tab open on Youtube. For troubleshooting you could try and close any applications you have open.
Also if you can post your full mpv log (with -v), that would be useful. Also a small sample could be helpful.
I closed all other applications that could potentially use hardware decoding, and it doesn't seem to help. I tried the -v flag, and found some interesting entries:
[decvideo] Codec list:
[decvideo] lavc:h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[decvideo] lavc:h264_vda (h264) - H.264 (VDA acceleration)
[decvideo] Opening video decoder lavc:h264
[decvideo] Requested hardware decoder not compiled.
[decvideo] Using software decoding.
[decvideo] Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264]
I'm using the Homebrew installed version of mpv 0.2.2. I checked with brew options mpv and didn't find any flags that are relevant to enable hardware decoding.
$ brew info mpv
mpv: stable 0.2.2, HEAD
https://github.com/mpv-player/mpv
/usr/local/Cellar/mpv/0.2.1 (62 files, 44M) *
Built from source with: --with-dist-bundle, --with-libquvi, --with-libbs2b, --with-bluray-support
Aw shit. You need a new enough version of ffmpeg. Stable release in
homebrew (1.2) is not new enough because they suck and want to support
shitty downstream software. brew install --HEAD ffmpeg and then reinstall
mpv.
Ha! Now it works! Is there anyway for the Homebrew version of mpv to require ffmpeg 2.0 in the dependency? So it'll be clear for others, I hope!
AFAIK it's not possibile to require 2.0 but I added a caveat to the mpv formula so that others can be informed of the issue.
Hey, just wanted to let you know that ffmpeg --devel is set to the latest stable version of 2.1, so you may want to make a note of that too.
Also, maybe you should put this stuff in the mpv readme so people could see it before they install mpv.