9.2 KiB
FFmpeg VVC En/decoder & xHE-AAC installation (Windows, Mac OS and Linux)
Windows, Mac and Linux (Preview of VVC video in FFplay):
Play video file
You can play VVC video codec with .h266, .vvc, .266 and anything or .mp4 mixed with VVC codec:
ffplay_vvceasy versatile.266
Or if you have xHE-AAC audio codec:
ffplay_vvceasy -codec:a libfdk_aac -i versatile.m4a
Limitations of FFmpeg VVC encoder
Before encode to VVC video codec, see the limitations below.
libvvenc (FFmpeg vvc version) works for:
- Pixel format ⚠️ (only pixel format 10 bit)
- Video size (auto detects, but it doesn't detect for SAR and DAR anamorphic is glitch and corrupts the video) ⚠️ (Better way to use vvencapp without FFmpeg)
- Frame rate ✅ (auto detects)
- MP4/TS Mux ✅
- Matroska mux ⚠️ (Only matroska mux has an experimental, causing problem of the video sync delay with audio and others for FFmpeg libvvdec. It is unofficial support)
- Audio with encode VVC ✅
- Bitrates ✅
- Passes ⚠️ (you may need get passes using vvenc params on FFmpeg VVCEasy or use vvencapp)
- Presets ✅
- QP ✅
- HDR ✅
Built in libvvenc for FFmpeg command:
ffmpeg -i example.mp4 -c:v libvvenc -qp 37 -preset slow example.266
For more options for libvvenc in FFmpeg VVCEasy version, type ffmpeg_vvceasy -h encoder=libvvenc
for available commands.
Additional command: You can convert to VVC video without taking a much space for vvencapp, example:
ffmpeg -i example.mp4 -pix_fmt yuv420p -f yuv4mpegpipe - | vvencapp --y4m -i - --preset medium --qp 35 -o converted.266
Converting xHE-AAC to AAC audio:
ffmpeg -c:a libfdk_aac -i mymusic.m4a -c:a aac -b:a 128k mymusic.aac
Replace video size for -s
and frame rate for -r
.
Update 21th May 2022 of FFmpeg vvdec support
Good news, you can play .mp4 file after .h266 and audio format were merged into mp4 playable of VVC.
About xHE-AAC, now it's available decode support xHE-AAC of FFmpeg. Exhale (encoder) is free to use and open source, but if you want Fraunhofer IIS xHE-AAC, you can download EZ CD Audio Converter for Windows only. You can also merge your encoded xHE-AAC audio into mp4 too.
To make playable mp4 with audio and video together, you need VVC video encoded, audio file and GPAC Nightly build. Code for mp4box/gpac to merge VVC video encoded and audio file:
mp4box -add video.266 -add audio.m4a -new convertedvvc.mp4
Containers are also acceptable video containers of .mkv, .mp4, .mov and more.
For Linux and Mac OS users: Replace mp4box by gpac
FFmpeg Downloads (xHE-AAC & VVC en/decoder plugin compiled by Martin Eesmaa)
Linux (Only FFplay static won't work)
FFmpeg-FixVVC archived old source code (old)
Note about downloads
I use always Windows to compile FFmpeg, so I forgot to compile every time for Mac OS and Linux. Also, please check changelog before you download the new version.
Changelog
22/06/2023: Updated Linux FFmpeg by FFmpeg commits and other libraries. (still does not work for FFplay static only, others working fine)
21/06/2023: Updated vvenc and FFmpeg commits.
17/06/2023: Updated of vvenc, vvdec, dav1d, FFmpeg commits and others.
01/05/2023: Added missing libvmaf feature in FFmpeg VVCEasy only.
19/04/2023: Updated of vvenc, vvdec, FFmpeg commits and others.
03/04/2023: New FFmpeg master latest VVCEasy builds with updated vvenc, vvdec and added libvmaf & libjxl. Removed AC4 for compilation/decoder errors for new AC4 audio files.
03/02/2023: Updated vvenc library on Windows FFmpeg VVCEasy build.
02/02/2023: Updated vvenc library and others on Windows FFmpeg VVCEasy build.
29/01/2023: Updated vvenc, vvdec and other libraries on Windows FFmpeg VVCEasy build.
10/01/2023: Updated vvenc latest and others.
05/01/2023: Update Linux FFmpeg static builds (still does not work for FFplay static only, others working fine)
30/12/2022: Improved vvenc codes of FFmpeg VVCEasy, thanks Thomas Siedel from Spin Digital! TIP: Type "ffmpeg_vvceasy -h encoder=libvvenc" for FFmpeg vvenc available. See the new vvenc patch: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=7922
23/12/2022: Update all libraries, fix MP4-ALS mono audio & added libcodec2 to FFmpeg.
07/12/2022: Update vvenc, vvdec and others. Fixed Windows N version. (#22)
20/10/2022: Add Linux static binaries of FFmpeg, but only FFplay does not work only.
11/10/2022: Removed libvorbis + updated SDL2 latest.
10/10/2022: Revert from flt to s16 for two decoders of libvorbis & libspeex.
10/10/2022: Removed libvmaf (reason: not working), added libvorbis + libspeex improve decode quality.
30/09/2022: Improved vmaf (float, built models to FFmpeg) & updated sdl2. Update: Fixed libvmaf models
24/09/2022: Improved libvmaf up to date of FFmpeg code + update dav1d & vvenc.
07/09/2022: Added Dolby AC4 decoder + updated vvenc/vvdec.
01/09/2022: Added libopus with latest version for improve decode quality, libdav1d and libvmaf (optional if they want calculate score by vvc video and original video).
29/08/2022: Brought back vvenc.
Mac OS downloaders (Important note)
Please note, this is not a malware of my compiled build, see the three screenshots to make run FFmpeg tools customized version
You need to allow the app on your Mac OS for chmod write access & Security & Privacy:
Step 1: Click cancel button, do not move to bin.
Step 2: Go to Security & Privacy on Mac OS Settings app, then check App Store & identified developers or anywhere is on. Click "Allow anyway" to unblock an application.
Step 3: Click "Open" button, this does not hurt your computer.
Build Mac OS for FFmpeg VVC build
Requirements:
Xcode
CMake
NASM
Homebrew
Code to build FFmpeg VVC version:
brew install libxml2 ffmpeg fdk-aac nasm
git clone https://github.com/fraunhoferhhi/vvenc
git clone https://github.com/fraunhoferhhi/vvdec
cd vvenc && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
sudo cmake --build . --target install -j $nproc
cd ../../
cd vvdec && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
sudo cmake --build . --target install -j $nproc
cd ../../
git clone --depth=1 https://github.com/MartinEesmaa/FFmpeg-FixVVC
cd FFmpeg-FixVVC
./configure --enable-libfdk-aac --enable-libvvenc --enable-libvvdec --enable-static --enable-pic --enable-libxml2 --pkg-config-flags="--static" --enable-sdl2
make -j
Linux builders (Important for FFplay)
You can build using Linux script.
If you want actually play VVC file with FFplay on your local distro, you need to remove command --extra-ldexeflags="-static"
, otherwise it might give result segmentation fault for FFplay static only.
If compiling is success and finished, you can install FFmpeg VVC for using the code:
mv ffmpeg ffmpeg_vvceasy
mv ffplay ffplay_vvceasy
mv ffprobe ffprobe_vvceasy
sudo cp ffmpeg_vvceasy ffplay_vvceasy ffprobe_vvceasy /usr/local/bin
Special thanks
VVC programmers of FFmpeg:
Original author: @FFmpeg Repository: https://github.com/FFmpeg/FFmpeg
@lehmann-c (Christian Lehmann) Repository: https://github.com/lehmann-c/FFmpeg
@tbiat (Thibaud Biatek) Repository: https://github.com/tbiat/FFmpeg
VVC encoder programmer to FFmpeg: @IsaMorphic (Isabelle Santin) Repository: https://github.com/IsaMorphic/FFmpeg-VVC
@MartinEesmaa (Martin Eesmaa) Repository: https://github.com/MartinEesmaa/FFmpeg-VVC
@NuoMi of some codes and Thomas Siedel of new external VVC encoder & decoder.
AC4 decoder programmer to FFmpeg: @richardpl (Paul B Mahol) Repository: https://github.com/richardpl/FFmpeg/tree/ac4
AC4 support in mp4 container: @AUGxhub Repository: https://github.com/AUGxhub/FFmpeg/tree/patch-1
- Martin Eesmaa