-
-
Notifications
You must be signed in to change notification settings - Fork 55.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AV1 support #11389
Comments
What is license of libaom? (we can't build with other GPL libraries; LGPL is fine) It would be nice to have AV1 support. +1-2Mb size increase should not be a huge issue. |
@alalek Great! Wikipedia says it's a |
make_mingw.sh# Libaom
libaom_DIR=${BUILD_DIR}/libaom
libaom_x86_DIR=${BUILD_DIR}/libaom_x86
libaom_x64_DIR=${BUILD_DIR}/libaom_x64
libaom_configure_OPTIONS="-DENABLE_EXAMPLES=OFF -DENABLE_TOOLS=OFF -DCONFIG_UNIT_TESTS=0 -DCONFIG_MULTITHREAD=0"
if [ ! -d ${libaom_DIR} ]; then
echo "Libaom source tree is not found"
exit 1
fi
##[ -d ${libaom_x86_DIR} ] ||
#(
cd ${libaom_DIR}
mkdir -p ${libaom_x86_DIR} ${libaom_x86_DIR}/build_output
rsync -a ./ ${libaom_x86_DIR} --exclude .git
cd ${libaom_x86_DIR}/build_output
cmake -DAOM_TARGET_CPU=generic -DCMAKE_TOOLCHAIN_FILE=${libaom_x86_DIR}/build/cmake/toolchains/x86-mingw-gcc.cmake -DCMAKE_INSTALL_PREFIX=${libaom_x86_DIR}/install ${libaom_configure_OPTIONS} ..
make -j ${CPU_COUNT}
make install
#)
#[ -d ${libaom_x64_DIR} ] ||
(
cd ${libaom_DIR}
mkdir -p ${libaom_x64_DIR} ${libaom_x64_DIR}/build_output
rsync -a ./ ${libaom_x64_DIR} --exclude .git
cd ${libaom_x64_DIR}/build_output
cmake -DAOM_TARGET_CPU=generic -DCMAKE_TOOLCHAIN_FILE=${libaom_x64_DIR}/build/cmake/toolchains/x86_64-mingw-gcc.cmake -DCMAKE_INSTALL_PREFIX=${libaom_x64_DIR}/install ${libaom_configure_OPTIONS} ..
make -j ${CPU_COUNT}
make install
) Add Add ffmpeg link directory x86: ffmpeg_version.cmakeset(FFMPEG_libpostproc_FOUND 1)
set(FFMPEG_libavcodec_FOUND 1)
set(FFMPEG_libavformat_FOUND 1)
set(FFMPEG_libavutil_FOUND 1)
set(FFMPEG_libswscale_FOUND 1)
set(FFMPEG_libavresample_FOUND 1)
set(FFMPEG_libpostproc_VERSION 55.1.100)
set(FFMPEG_libavcodec_VERSION 58.18.100)
set(FFMPEG_libavformat_VERSION 58.12.100)
set(FFMPEG_libavutil_VERSION 56.14.100)
set(FFMPEG_libswscale_VERSION 5.1.100)
set(FFMPEG_libavresample_VERSION 4.0.0) download_src.shUpdate ffmpeg to tag Probably should wait until they have tagged a new release from master. Winning/cc @alalek I have a local build working now and AV1 encoding/decoding is working fine. You should probably wait to include |
Binary size for ffmpeg (n4.0) x64 build is roughly 24mb libaom included. |
Thank you! Could you please open PR to ffmpeg/master? I will check it and necessary updates. |
Great news: libaom 1.0 release |
@alalek I'm upgrading to v1.0.0 now. Going to run it in our staging environment for a few days. If everything works out I'll submit a PR. We should probably also consider adding support for their new image format https://aomediacodec.github.io/av1-avif/. |
@alalek https://github.com/xiph/rav1e support just landed in FFmpeg/FFmpeg@d8bf244. Once available in the next release of ffmpeg I will submit a PR. |
@peters Do you plan to work on the patch in mean time? |
@asmorkalov Unfortunately, no. |
Alternative encoder/decoder to rav1e: https://github.com/OpenVisualCloud/SVT-AV1 |
@pwuertz In my opinion the best way forward is to modify the docker build script in opencv_3rdparty
That is correct. @alalek Maybe you could provide @pwuertz some guidance? :) Maybe we should consider using github actions as it supports build matrixes. |
AV1 encoding support using rav1e just landed in ffmpeg 4.3 release: https://github.com/FFmpeg/FFmpeg/blob/master/Changelog#L28 |
libaom v2.0.0 has been released: https://aomedia.googlesource.com/aom/+/refs/tags/v2.0.0/CHANGELOG. |
I have a working build for There is also the case of decoding support. The library that looks the most promising right now is https://github.com/videolan/dav1d. I have not tried building it yet because we do not require decoding support atm. But if we choose to enable decoding support in the future, the build pipeline should IMHO be improved upon :) |
@peters Thank you for updates! |
is there any news regarding this? AV1 Support would be awesome! |
Did AV1 support added? I download a '.mkv' video from youtube, when i use ''cap = cv2.VideoCapture('2.mkv')" it errored, as follows: |
@alalek FFMPEG 4 now supports libaom enabling encoding of AV1 videos. I'm thinking of adding support for it in opencv_thirdparty. If the final binary
opencv_ffmpeg.dll
does not increase that much in size would this be something that could considered to be included in the official build?The text was updated successfully, but these errors were encountered: