Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#11506 closed defect (invalid)

FFMPEG's AV1 hardware decoding is completely broken on Mac

Reported by: Jaden LeMieux Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: videotoolbox av1 macos mkv
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

This is the latest build that I got from here: https://evermeet.cx/ffmpeg/ - The ones on the left.

I did ./ffplay [input file], and my video played, however it was EXTREMELY CHOPPY, and stops a few seconds in because the SOFTWARE DECODER cannot keep up.
The problem here is this M4 Pro MacBook Pro has AV1 decoding hardware, and ffmpeg is just not using it by default for some reason.
Ok, time to make it do what it should do in the first place!
./ffplay -hwaccel videotoolbox [input file]
Nope! Still doesn't work, I get even less than before. It seems only the audio plays correctly, the video is... I don't even know really. It looks kind of like a spectogram. The video likely just failed.
Here's what it gave me:
Last login: Thu Mar 13 01:24:56 on ttys000
jaden@PureSlate ~ % cd Downloads
jaden@PureSlate Downloads % ./ffplay /Volumes/Nitor/_RENDERS/BeatMinecraftStreamArchive2025.mkv
ffplay version N-118608-g25c439296b-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2003-2025 the FFmpeg developers

built with Apple clang version 16.0.0 (clang-1600.0.26.6)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libharfbuzz --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --enable-librtmp --enable-ffplay --enable-sdl2 --disable-ffmpeg --disable-ffprobe
libavutil 59. 58.100 / 59. 58.100
libavcodec 61. 33.102 / 61. 33.102
libavformat 61. 9.107 / 61. 9.107
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 9.100 / 10. 9.100
libswscale 8. 13.100 / 8. 13.100
libswresample 5. 4.100 / 5. 4.100
libpostproc 58. 4.100 / 58. 4.100

Input #0, matroska,webm, from '/Volumes/Nitor/_RENDERS/BeatMinecraftStreamArchive2025.mkv':

Metadata:

TIMECODE : 00:00:00:00
creation_time : 2025-03-12T02:49:53.000000Z
ENCODER : Lavf60.3.100

Duration: 05:14:52.45, start: 0.000000, bitrate: 107566 kb/s
Stream #0:0: Video: av1 (libdav1d) (Main), yuv420p(tv, bt709, progressive), 3840x2160, 60 fps, 60 tbr, 1k tbn

Metadata:

ENCODER : AV1 8-bit - NVIDIA
DURATION : 05:14:52.450000000

Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default)

Metadata:

DURATION : 05:14:52.450000000

2025-03-13 01:30:59.590 ffplay[15981:3366776] +[IMKClient subclass]: chose IMKClient_Modern

8.25 A-V: -1.594 fd= 243 aq= 0KB vq=15937KB sq= 0B

jaden@PureSlate Downloads % ./ffplay -hwaccel videotoolbox /Volumes/Nitor/_RENDERS/BeatMinecraftStreamArchive2025.mkv
ffplay version N-118608-g25c439296b-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2003-2025 the FFmpeg developers

built with Apple clang version 16.0.0 (clang-1600.0.26.6)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libharfbuzz --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --enable-librtmp --enable-ffplay --enable-sdl2 --disable-ffmpeg --disable-ffprobe
libavutil 59. 58.100 / 59. 58.100
libavcodec 61. 33.102 / 61. 33.102
libavformat 61. 9.107 / 61. 9.107
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 9.100 / 10. 9.100
libswscale 8. 13.100 / 8. 13.100
libswresample 5. 4.100 / 5. 4.100
libpostproc 58. 4.100 / 58. 4.100

Enable vulkan renderer to support hwaccel videotoolbox
Doesn't support vulkan renderer, fallback to SDL renderer
Input #0, matroska,webm, from '/Volumes/Nitor/_RENDERS/BeatMinecraftStreamArchive2025.mkv':

Metadata:

TIMECODE : 00:00:00:00
creation_time : 2025-03-12T02:49:53.000000Z
ENCODER : Lavf60.3.100

Duration: 05:14:52.45, start: 0.000000, bitrate: 107566 kb/s
Stream #0:0: Video: av1 (libdav1d) (Main), yuv420p(tv, bt709, progressive), 3840x2160, 60 fps, 60 tbr, 1k tbn

Metadata:

ENCODER : AV1 8-bit - NVIDIA
DURATION : 05:14:52.450000000

Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default)

Metadata:

DURATION : 05:14:52.450000000

Vulkan renderer is not available
2025-03-13 01:33:26.094 ffplay[15984:3368360] +[IMKClient subclass]: chose IMKClient_Modern

5.37 M-A: 0.000 fd= 0 aq= 197KB vq= 0KB sq= 0B

jaden@PureSlate Downloads %

Did anyone EVER test this crap - I know this was likely tested by someone, but they obviously didn't do a great job because if it doesn't work on a 1 Mac, it likely doesn't work on any of em, and there's only so many models that have this functionality to begin with.. and this is what is holding back everyone else like IINA and VLC for AV1 decoding support on Apple Silicon.

Change History (6)

comment:1 by quinkblack, 18 months ago

Resolution: invalid
Status: newclosed

The log says what's going wrong: "Enable vulkan renderer to support hwaccel videotoolbox".

Fix your built with --enable-libplacebo, not complain to developer.

If you only want to test hardware decoding, use ffmpeg, not ffplay.

comment:2 by Gyan, 18 months ago

The reporter is using a pre-compiled binary. They'll need probably need to install ffmpeg with the desired options using Homebrew or similar.

comment:3 by Jaden LeMieux, 18 months ago

Building myself is not an option. I've tried this many times, and it fails every time. I am using ffplay because I am trying to play a video. ffmpeg does me no good.

Last edited 18 months ago by Jaden LeMieux (previous) (diff)

comment:4 by Jaden LeMieux, 18 months ago

I sent an email to the evermeet person(s) for a request to enable that option that not having is breaking things.

comment:5 by Jaden LeMieux, 18 months ago

How do I enable ALL OPTIONS so that there is no chance of this happening again?

in reply to:  2 comment:6 by Jaden LeMieux, 18 months ago

Replying to Gyan:

The reporter is using a pre-compiled binary. They'll need probably need to install ffmpeg with the desired options using Homebrew or similar.

As far as I can tell, Homebrew doesn't give me that option.

Note: See TracTickets for help on using tickets.