Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Atarikid

macrumors 6502
Original poster
May 14, 2011
264
95
Today I compiled the latest FFmpeg build to see if it works with Videotoolbox Prores and VP9 hardware accelerated encoding.
According Apple, both are now supported via VideoToolBox APIs when running on M1 Pro or M1 Max
The latest FFmpeg version (daily build) does have support for it, so it seems. But after compiling, it does not work.
In FFmpeg compile log it is recognised though:

Enabled hwaccels:
h263_videotoolbox mpeg1_videotoolbox prores_videotoolbox
h264_videotoolbox mpeg2_videotoolbox vp9_videotoolbox
hevc_videotoolbox mpeg4_videotoolbox

But after successfully compiling this FFmpeg version, prores_videotoolbox and vp9_videotoolbox are not available (and of course not working). All others are working fine.
Does this mean macOS 12.0.1 does not yet has support for both (via Videotoolbox)?

BTW testen in a MBP 16” M1 Pro
 

Gnattu

macrumors 65816
Sep 18, 2020
1,107
1,671
By looking at the ffmpeg git logs, it seems like they only implemented hardware accelerated decoding in ffmpeg but not encoding.
 

Atarikid

macrumors 6502
Original poster
May 14, 2011
264
95
By looking at the ffmpeg git logs, it seems like they only implemented hardware accelerated decoding in ffmpeg but not encoding.
Were did you see this in the git logs? Looking in the source code, there is code to be found to encode to ProRes, VP9 and MPEG4 via Videotoolbox.
 

Gnattu

macrumors 65816
Sep 18, 2020
1,107
1,671
Were did you see this in the git logs? Looking in the source code, there is code to be found to encode to ProRes, VP9 and MPEG4 via Videotoolbox.
Where are the encoders implemented? They are not in libavcodec/videotoolboxenc.c, and the git commit only implements vp9/prores in libavcodec/videotoolbox.c which is used by decoder solely.
 

JimmyjamesEU

Suspended
Jun 28, 2018
397
426
Where are the encoders implemented? They are not in libavcodec/videotoolboxenc.c, and the git commit only implements vp9/prores in libavcodec/videotoolbox.c which is used by decoder solely.
Ffmpeg definitely has encoders for h.264 and hevc. I’ve been using them for years. I think macOS only supports vp9 decoding. It was implemented for YouTube 4K. Prores should decode and encode.
 

Gnattu

macrumors 65816
Sep 18, 2020
1,107
1,671
Ffmpeg definitely has encoders for h.264 and hevc. I’ve been using them for years. I think macOS only supports vp9 decoding. It was implemented for YouTube 4K. Prores should decode and encode.
Yes, and we can see there are H264 and HEVC profiles in libavcodec/videotoolboxenc.c, I’m asking for where the “VP9 and ProRes encoders” that OP claimed present are implemented in ffmepg because I cannot find them.
 

JimmyjamesEU

Suspended
Jun 28, 2018
397
426
Yes, and we can see there are H264 and HEVC profiles in libavcodec/videotoolboxenc.c, I’m asking for where the “VP9 and ProRes encoders” that OP claimed present are implemented in ffmepg because I cannot find them.
I certainly can’t imagine they are there for vp9, given the os only has a hardware decoder for that codec. I think the op is listing decoders.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.