8.1 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 muxed 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 ✅ (changeable of 8/10bit)
- 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 Muxing ❌ (does not support, you need MP4BOX after encode.)
- Audio with encode VVC ⚠️ (does not support, because it can corrupt the file) To avoid corrupt file, you need to disable audio using
-an
or you could do output container for .266, .vvc and .h266 too. - Bitrates ✅
- Passes ⚠️ (only one pass)
- Presets ⚠️ (only medium preset)
- QP/CRF ⚠️ (only you can set -global_quality command only, global_quality equals qp)
- HDR ⚠️ (default SDR, but cannot encode HDR)
Built in libvvenc for FFmpeg command:
ffmpeg -i example.mp4 -c:v libvvenc -global_quality 37 -pix_fmt yuv420p10 example.266
Additional command: You can convert to vvc video without taking a much space for vvencapp, example:
ffmpeg -i example.mp4 -f rawvideo -pix_fmt yuv420p - | vvencapp -i - -s 1920x1080 -r 25 --preset medium --qp 32 -o example1.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
Important Windows users for old builds
If you're using the old build, please download a new build of FFmpeg VVCEasy version.
Now it's static build of Windows FFmpeg VVCEasy version.
This is a fix of Intel CPU users and updated versions.
Special thanks to @ZenKiyoshi for Intel build bug. See the issue: #16
FFmpeg Downloads (xHE-AAC & VVC en/decoder plugin compiled by Martin Eesmaa)
Linux (Only Ubuntu 22.04 build)
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 customised 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 downloaders (Important note)
Unfortunately, this is Ubuntu 22.04 LTS build only.
If you are using other linux without Ubuntu 22.04 LTS, you have to build using this:
sudo apt install build-essential cmake nasm db-autoreconf && \
git clone --depth=1 https://github.com/fraunhoferhhi/vvenc && \
git clone --depth=1 https://github.com/fraunhoferhhi/vvdec && \
git clone --depth=1 https://github.com/mstorsjo/fdk-aac && \
git clone --depth=1 https://github.com/libsdl-org/SDL && \
git clone --depth=1 https://github.com/gnome/libxml2 && \
git clone --depth=1 https://github.com/MartinEesmaa/FFmpeg-FixVVC && \
cd vvenc && sudo make install-release install-prefix=/usr/local && \
cd .. && \
cd vvdec && sudo make install-release install-prefix=/usr/local && \
cd .. && \
cd fdk-aac && autoreconf -if && ./configure --prefix=/usr/local --enable-static --disable-shared && sudo make install -j $nproc && \
cd .. && \
cd libxml2 && autoreconf -if && ./configure --prefix=/usr/local --enable-static --disable-shared && sudo make install -j $nproc && \
cd .. && \
cd SDL && ./configure --prefix=/usr/local --enable-static --disable-shared && sudo make install -j $nproc && \
cd .. && cd FFmpeg-FixVVC && \
./configure --enable-static --pkg-config-flags="--static" --extra-ldexeflags="-static" \
--enable-libfdk-aac --enable-libvvenc --enable-libvvdec --enable-pic \
--enable-libxml2 --enable-sdl2 && \
make -j
If compiling is success and finished, you can install FFmpeg VVC, using the code:
mv ffmpeg ffmpeg_vvceasy
mv ffplay ffplay_vvceasy
mv ffprobe ffprobe_vvceasy
sudo cp ffmpeg_vvceasy /usr/local/bin
sudo cp ffplay_vvceasy /usr/local/bin
sudo cp 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 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-FixVVC
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