... and others
Jérôme Martinez
No Time to Wait 10, October 2026
Vulkan encoder and decoder in FFmpeg since 8.0 (August 2025)
Vulkan: well supported on Windows and Linux
Apple Silicon: no native Vulkan, so CPU only for now
CNA: Let's try to see what can be done
MediaArea now delivers FFmpeg builds with Vulkan support for macOS
Also development snaphots for the latest developments
Still needed: the Vulkan "driver" (KosmicKrisp), installed on the machine
→ macOS 26 required
Acceptable: let's focus on the future, and keep working with Vulkan
| Encoding | Decoding | |||
| GPU | CPU | GPU | CPU | |
| 2K 10-bit | 2.79x | 2.39x | 1.27x | 1.93x |
| 4K 10-bit | 0.75x | 0.67x | 0.33x | 0.52x |
| 4K 16-bit | 0.29x | 0.26x | 0.26x | 0.21x |
| 6K overscan 10-bit | 0.24x | 0.21x | 0.09x | 0.16x |
| 6K overscan 16-bit | 0.09x | 0.08x | 0.08x | 0.06x |
| 8K 10-bit | 0.22x | 0.20x | 0.08x | 0.15x |
| 8K 16-bit | 0.08x | 0.07x | 0.07x | 0.05x |
Speed in x real time. Encoding: GPU 11-17% faster. Decoding: GPU 20-36% faster in 16-bit, 34-43% slower in 10-bit
Initial plan: a native Metal proof of concept
With KosmicKrisp, the Vulkan driver for Metal...
... and the theoretical potential performance of the GPU...
A port to the Metal API is not worth the effort, for now
Now we have Apple Silicon GPU support...
... and while the GPU decodes, the CPU waits
Let's use both at the same time!
Easy way: 2 FFmpeg processes on 2 different files
Prototype: CPU and GPU decoders working at the same time on the same stream
Use case: RAWcooked. FFV1 decoding, rebuild of the original DPX files, MD5 hash to make sure that the decoding was fine
Let's do some profiling...
With the GPU decoder, the CPU is still used for the MD5 hash
It takes a lot of CPU time, not available for the CPU decoder
Let's optimize the MD5 hash with SIMD instructions
Better!
Lesson: profile the whole pipeline, not only the codec
Hybrid decoder: decoding + rebuild of the DPX files + MD5 hash
6464x4852 16-bit per component overscan scan, Apple M4
Hybrid: 2x faster than CPU only, 1.5x faster than GPU only
~90% of the theoretical CPU + GPU speed
6K 16-bit overscan is huge: not real time on such a machine
But a classic 4K 10-bit scan: decoding 3/4 of real time
On a laptop-class chip
4K 10-bit real time expected on M4 Pro / M4 Max
(to be confirmed)
Currently implemented in the RAWcooked decoder only
As we were there for Apple Silicon... we made it generic
In the next version of RAWcooked
RAWcooked decoding + DPX + MD5, same 6464x4852 16-bit overscan scan, x real time
Apple M4 "only" 90%: MD5 hash is partially responsible, M4 SIMD has 4 lanes vs 8 on x64
RTX 5070 Ti: it does not work yet. A GPU so powerful that it saturates the CPU? More tests needed
Hybrid decoding directly in FFmpeg?
Not with the current workflow. We need to see how other tools could use this possibility
VLC or QCTools decoder module?
Hybrid encoding in RAWcooked?
Support of more than 1 GPU?
Could be the next steps...
Who is interested?
Thank you CNA for sponsoring this!
MediaArea: https://mediaarea.net, @MediaArea_net
RAWcooked: https://MediaArea.net/RAWcooked
Jérôme Martinez: jerome@mediaarea.net
Slides: https://MediaArea.net/Events
License (except images): CC BY