diff --git a/.github/scripts/Linux/download_build_ffmpeg.sh b/.github/scripts/Linux/download_build_ffmpeg.sh index 07d37460b..3f0a2fdcb 100755 --- a/.github/scripts/Linux/download_build_ffmpeg.sh +++ b/.github/scripts/Linux/download_build_ffmpeg.sh @@ -25,6 +25,9 @@ install_svt() { ( git clone --depth 1 https://gitlab.com/AOMediaCodec/SVT-AV1.git && cd SVT-AV1 && cd Build && cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && cmake --build . --parallel && sudo cmake --install . || exit 1 ) ( git clone --depth 1 https://github.com/OpenVisualCloud/SVT-VP9.git && cd SVT-VP9/Build && cmake .. -DCMAKE_BUILD_TYPE=Release && cmake --build . --parallel && sudo cmake --install . || exit 1 ) # if patch apply fails, try increasing $FFMPEG_GIT_DEPTH + patch SVT-HEVC/ffmpeg_plugin/master-*.patch < "$GITHUB_WORKSPACE/"\ +.github/scripts/Linux/tmp/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.\ +patch.patch git am -3 SVT-HEVC/ffmpeg_plugin/master-*.patch git am -3 SVT-VP9/ffmpeg_plugin/master-*.patch } diff --git a/.github/scripts/Linux/tmp/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch.patch b/.github/scripts/Linux/tmp/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch.patch new file mode 100644 index 000000000..a679d48b3 --- /dev/null +++ b/.github/scripts/Linux/tmp/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch.patch @@ -0,0 +1,93 @@ +--- ../SVT-HEVC/ffmpeg_plugin/master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch 2023-04-04 08:28:28.361679580 +0200 ++++ 0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch 2024-01-03 08:43:52.180372916 +0100 +@@ -1,4 +1,4 @@ +-From 673e67dfff221da589e28216927fe5efd5b40586 Mon Sep 17 00:00:00 2001 ++From 80ac47b42a37754f440577ce0c54f9c2cc5a86a3 Mon Sep 17 00:00:00 2001 + From: Jing Sun + Date: Wed, 21 Nov 2018 11:33:04 +0800 + Subject: [PATCH] lavc/svt_hevc: add libsvt hevc encoder wrapper +@@ -19,7 +19,7 @@ + create mode 100644 libavcodec/libsvt_hevc.c + + diff --git a/configure b/configure +-index c726076da1..c00fcd0294 100755 ++index dc400db176..b2266f7ecd 100755 + --- a/configure + +++ b/configure + @@ -291,6 +291,7 @@ External library support: +@@ -27,10 +27,10 @@ + --enable-libx264 enable H.264 encoding via x264 [no] + --enable-libx265 enable HEVC encoding via x265 [no] + + --enable-libsvthevc enable HEVC encoding via svt [no] ++ --enable-libxeve enable EVC encoding via libxeve [no] ++ --enable-libxevd enable EVC decoding via libxevd [no] + --enable-libxavs enable AVS encoding via xavs [no] +- --enable-libxavs2 enable AVS2 encoding via xavs2 [no] +- --enable-libxcb enable X11 grabbing using XCB [autodetect] +-@@ -1852,6 +1853,7 @@ EXTERNAL_LIBRARY_LIST=" ++@@ -1899,6 +1900,7 @@ EXTERNAL_LIBRARY_LIST=" + libsrt + libssh + libsvtav1 +@@ -38,7 +38,7 @@ + libtensorflow + libtesseract + libtheora +-@@ -3404,6 +3406,7 @@ vapoursynth_demuxer_deps="vapoursynth" ++@@ -3494,6 +3496,7 @@ vapoursynth_demuxer_deps="vapoursynth" + videotoolbox_suggest="coreservices" + videotoolbox_deps="corefoundation coremedia corevideo" + videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrames" +@@ -46,7 +46,7 @@ + + # demuxers / muxers + ac3_demuxer_select="ac3_parser" +-@@ -6678,6 +6681,7 @@ enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp ++@@ -6865,6 +6868,7 @@ enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/ + enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init + enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket + enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc >= 0.9.0" EbSvtAv1Enc.h svt_av1_enc_init_handle +@@ -55,29 +55,29 @@ + enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate + enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg + diff --git a/libavcodec/Makefile b/libavcodec/Makefile +-index 1fb963f820..77c9926ea6 100644 ++index 5dd5ea68a6..fe096c4050 100644 + --- a/libavcodec/Makefile + +++ b/libavcodec/Makefile +-@@ -1126,6 +1126,7 @@ OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_anim ++@@ -1155,6 +1155,7 @@ OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_anim + OBJS-$(CONFIG_LIBX262_ENCODER) += libx264.o + OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o + OBJS-$(CONFIG_LIBX265_ENCODER) += libx265.o + +OBJS-$(CONFIG_LIBSVT_HEVC_ENCODER) += libsvt_hevc.o + OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o + OBJS-$(CONFIG_LIBXAVS2_ENCODER) += libxavs2.o +- OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o ++ OBJS-$(CONFIG_LIBXEVD_DECODER) += libxevd.o + diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c +-index ff82423a88..57f085415c 100644 ++index b0f004e15c..dc0950be5f 100644 + --- a/libavcodec/allcodecs.c + +++ b/libavcodec/allcodecs.c +-@@ -812,6 +812,7 @@ extern LIBX264_CONST FFCodec ff_libx264_encoder; ++@@ -822,6 +822,7 @@ extern LIBX264_CONST FFCodec ff_libx264_encoder; + #endif + extern const FFCodec ff_libx264rgb_encoder; + extern FFCodec ff_libx265_encoder; + +extern FFCodec ff_libsvt_hevc_encoder; ++ extern const FFCodec ff_libxeve_encoder; ++ extern const FFCodec ff_libxevd_decoder; + extern const FFCodec ff_libxavs_encoder; +- extern const FFCodec ff_libxavs2_encoder; +- extern const FFCodec ff_libxvid_encoder; + diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c + new file mode 100644 + index 0000000000..739144ca0c +@@ -670,5 +670,5 @@ + + .p.wrapper_name = "libsvt_hevc", + +}; + -- +-2.39.1 ++2.43.0 + diff --git a/.github/scripts/Linux/tmp/README.txt b/.github/scripts/Linux/tmp/README.txt new file mode 100644 index 000000000..e92641834 --- /dev/null +++ b/.github/scripts/Linux/tmp/README.txt @@ -0,0 +1 @@ +TOREMOVE - temporary workaround