diff --git a/ffmpeg-4.2.9.tar.xz b/ffmpeg-4.4.4.tar.xz similarity index 52% rename from ffmpeg-4.2.9.tar.xz rename to ffmpeg-4.4.4.tar.xz index 06f4657..3419dc3 100644 Binary files a/ffmpeg-4.2.9.tar.xz and b/ffmpeg-4.4.4.tar.xz differ diff --git a/ffmpeg.spec b/ffmpeg.spec index 1bfc665..e6341bd 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -60,18 +60,12 @@ ExclusiveArch: armv7hnl Summary: Digital VCR and streaming server Name: ffmpeg%{?flavor} -Version: 4.2.9 +Version: 4.4.4 Release: 1 License: GPL-3.0-or-later URL: http://ffmpeg.org/ -%if 0%{?date} -Source0: ffmpeg-%{?branch}%{date}.tar.bz2 -%else Source0: http://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz -%endif -Patch0: fix_ppc_build.patch -Patch1: fix-vmaf-model-path.patch -Patch2: fix-build-error-about-srt.patch +Patch0: fix-vmaf-model-path.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} %{?_with_cuda:BuildRequires: cuda-minimal-build-%{_cuda_version_rpm} cuda-drivers-devel} @@ -296,12 +290,7 @@ This package contains development files for %{name} %prep -%if 0%{?date} -%autosetup -p1 -n ffmpeg-%{?branch}%{date} -echo "git-snapshot-%{?branch}%{date}-rpmfusion" > VERSION -%else %autosetup -p1 -n ffmpeg-%{version} -%endif # fix -O3 -g in host_cflags sed -i "s|check_host_cflags -O3|check_host_cflags %{optflags}|" configure mkdir -p _doc/examples @@ -405,6 +394,9 @@ install -pm755 tools/qt-faststart %{buildroot}%{_bindir} %changelog +* Wed Nov 27 2023 Jingwiw - 4.4.4-1 +- Upgrade to 4.4.4 + * Tue Nov 14 2023 ouuleilei - 4.2.9-1 - Upgrade to 4.2.9 diff --git a/fix-build-error-about-srt.patch b/fix-build-error-about-srt.patch deleted file mode 100644 index 6ecc378..0000000 --- a/fix-build-error-about-srt.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 260ae204c3cbb2b09d5db77fb94c3e62812df7b2 Mon Sep 17 00:00:00 2001 -From: peijiankang -Date: Tue, 15 Aug 2023 13:11:28 +0800 -Subject: [PATCH] fix build error about srt - ---- - libavformat/libsrt.c | 50 +++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 47 insertions(+), 3 deletions(-) - -diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c -index b556808..493cfb9 100644 ---- a/libavformat/libsrt.c -+++ b/libavformat/libsrt.c -@@ -62,6 +62,12 @@ typedef struct SRTContext { - int64_t maxbw; - int pbkeylen; - char *passphrase; -+#if SRT_VERSION_VALUE >= 0x010302 -+ int enforced_encryption; -+ int kmrefreshrate; -+ int kmpreannounce; -+ int64_t snddropdelay; -+#endif - int mss; - int ffs; - int ipttl; -@@ -101,6 +107,12 @@ static const AVOption libsrt_options[] = { - { "maxbw", "Maximum bandwidth (bytes per second) that the connection can use", OFFSET(maxbw), AV_OPT_TYPE_INT64, { .i64 = -1 }, -1, INT64_MAX, .flags = D|E }, - { "pbkeylen", "Crypto key len in bytes {16,24,32} Default: 16 (128-bit)", OFFSET(pbkeylen), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 32, .flags = D|E }, - { "passphrase", "Crypto PBKDF2 Passphrase size[0,10..64] 0:disable crypto", OFFSET(passphrase), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = D|E }, -+#if SRT_VERSION_VALUE >= 0x010302 -+ { "enforced_encryption", "Enforces that both connection parties have the same passphrase set", OFFSET(enforced_encryption), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, .flags = D|E }, -+ { "kmrefreshrate", "The number of packets to be transmitted after which the encryption key is switched to a new key", OFFSET(kmrefreshrate), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, -+ { "kmpreannounce", "The interval between when a new encryption key is sent and when switchover occurs", OFFSET(kmpreannounce), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, -+ { "snddropdelay", "The sender's extra delay(in microseconds) before dropping packets", OFFSET(snddropdelay), AV_OPT_TYPE_INT64, { .i64 = -2 }, -2, INT64_MAX, .flags = D|E }, -+#endif - { "mss", "The Maximum Segment Size", OFFSET(mss), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1500, .flags = D|E }, - { "ffs", "Flight flag size (window size) (in bytes)", OFFSET(ffs), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, - { "ipttl", "IP Time To Live", OFFSET(ipttl), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 255, .flags = D|E }, -@@ -312,6 +324,9 @@ static int libsrt_set_options_pre(URLContext *h, int fd) - int latency = s->latency / 1000; - int rcvlatency = s->rcvlatency / 1000; - int peerlatency = s->peerlatency / 1000; -+#if SRT_VERSION_VALUE >= 0x010302 -+ int snddropdelay = s->snddropdelay > 0 ? s->snddropdelay / 1000 : s->snddropdelay; -+#endif - int connect_timeout = s->connect_timeout; - - if ((s->mode == SRT_MODE_RENDEZVOUS && libsrt_setsockopt(h, fd, SRTO_RENDEZVOUS, "SRTO_RENDEZVOUS", &yes, sizeof(yes)) < 0) || -@@ -319,14 +334,25 @@ static int libsrt_set_options_pre(URLContext *h, int fd) - (s->maxbw >= 0 && libsrt_setsockopt(h, fd, SRTO_MAXBW, "SRTO_MAXBW", &s->maxbw, sizeof(s->maxbw)) < 0) || - (s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) || - (s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) || -- (s->mss >= 0 && libsrt_setsockopt(h, fd, SRTO_MSS, "SRTO_MMS", &s->mss, sizeof(s->mss)) < 0) || -+#if SRT_VERSION_VALUE >= 0x010302 -+#if SRT_VERSION_VALUE >= 0x010401 -+ (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) || -+#else -+ /* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for compatibility, we used SRTO_STRICTENC */ -+ (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) || -+#endif -+ (s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", &s->kmrefreshrate, sizeof(s->kmrefreshrate)) < 0) || -+ (s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", &s->kmpreannounce, sizeof(s->kmpreannounce)) < 0) || -+ (s->snddropdelay >=-1 && libsrt_setsockopt(h, fd, SRTO_SNDDROPDELAY, "SRTO_SNDDROPDELAY", &snddropdelay, sizeof(snddropdelay)) < 0) || -+#endif -+ (s->mss >= 0 && libsrt_setsockopt(h, fd, SRTO_MSS, "SRTO_MSS", &s->mss, sizeof(s->mss)) < 0) || - (s->ffs >= 0 && libsrt_setsockopt(h, fd, SRTO_FC, "SRTO_FC", &s->ffs, sizeof(s->ffs)) < 0) || -- (s->ipttl >= 0 && libsrt_setsockopt(h, fd, SRTO_IPTTL, "SRTO_UPTTL", &s->ipttl, sizeof(s->ipttl)) < 0) || -+ (s->ipttl >= 0 && libsrt_setsockopt(h, fd, SRTO_IPTTL, "SRTO_IPTTL", &s->ipttl, sizeof(s->ipttl)) < 0) || - (s->iptos >= 0 && libsrt_setsockopt(h, fd, SRTO_IPTOS, "SRTO_IPTOS", &s->iptos, sizeof(s->iptos)) < 0) || - (s->latency >= 0 && libsrt_setsockopt(h, fd, SRTO_LATENCY, "SRTO_LATENCY", &latency, sizeof(latency)) < 0) || - (s->rcvlatency >= 0 && libsrt_setsockopt(h, fd, SRTO_RCVLATENCY, "SRTO_RCVLATENCY", &rcvlatency, sizeof(rcvlatency)) < 0) || - (s->peerlatency >= 0 && libsrt_setsockopt(h, fd, SRTO_PEERLATENCY, "SRTO_PEERLATENCY", &peerlatency, sizeof(peerlatency)) < 0) || -- (s->tlpktdrop >= 0 && libsrt_setsockopt(h, fd, SRTO_TLPKTDROP, "SRTO_TLPKDROP", &s->tlpktdrop, sizeof(s->tlpktdrop)) < 0) || -+ (s->tlpktdrop >= 0 && libsrt_setsockopt(h, fd, SRTO_TLPKTDROP, "SRTO_TLPKTDROP", &s->tlpktdrop, sizeof(s->tlpktdrop)) < 0) || - (s->nakreport >= 0 && libsrt_setsockopt(h, fd, SRTO_NAKREPORT, "SRTO_NAKREPORT", &s->nakreport, sizeof(s->nakreport)) < 0) || - (connect_timeout >= 0 && libsrt_setsockopt(h, fd, SRTO_CONNTIMEO, "SRTO_CONNTIMEO", &connect_timeout, sizeof(connect_timeout)) <0 ) || - (s->sndbuf >= 0 && libsrt_setsockopt(h, fd, SRTO_SNDBUF, "SRTO_SNDBUF", &s->sndbuf, sizeof(s->sndbuf)) < 0) || -@@ -334,7 +360,11 @@ static int libsrt_set_options_pre(URLContext *h, int fd) - (s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", &s->lossmaxttl, sizeof(s->lossmaxttl)) < 0) || - (s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, "SRTO_MINVERSION", &s->minversion, sizeof(s->minversion)) < 0) || - (s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) || -+#if SRT_VERSION_VALUE >= 0x010401 -+ (s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, "SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) || -+#else - (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) || -+#endif - (s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", &s->messageapi, sizeof(s->messageapi)) < 0) || - (s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 0) || - ((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, SRTO_SENDER, "SRTO_SENDER", &yes, sizeof(yes)) < 0)) { -@@ -495,6 +525,20 @@ static int libsrt_open(URLContext *h, const char *uri, int flags) - if (av_find_info_tag(buf, sizeof(buf), "passphrase", p)) { - s->passphrase = av_strndup(buf, strlen(buf)); - } -+#if SRT_VERSION_VALUE >= 0x010302 -+ if (av_find_info_tag(buf, sizeof(buf), "enforced_encryption", p)) { -+ s->enforced_encryption = strtol(buf, NULL, 10); -+ } -+ if (av_find_info_tag(buf, sizeof(buf), "kmrefreshrate", p)) { -+ s->kmrefreshrate = strtol(buf, NULL, 10); -+ } -+ if (av_find_info_tag(buf, sizeof(buf), "kmpreannounce", p)) { -+ s->kmpreannounce = strtol(buf, NULL, 10); -+ } -+ if (av_find_info_tag(buf, sizeof(buf), "snddropdelay", p)) { -+ s->snddropdelay = strtoll(buf, NULL, 10); -+ } -+#endif - if (av_find_info_tag(buf, sizeof(buf), "mss", p)) { - s->mss = strtol(buf, NULL, 10); - } --- -2.33.0 - diff --git a/fix-vmaf-model-path.patch b/fix-vmaf-model-path.patch index 88a949b..5a5500a 100644 --- a/fix-vmaf-model-path.patch +++ b/fix-vmaf-model-path.patch @@ -1,14 +1,5 @@ -From 37b8f54578ac1bcb7a63dc9038a5238fd6a58793 Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Sat, 23 May 2020 12:32:44 +0100 -Subject: [PATCH] fix vmaf model path - ---- - libavfilter/vf_libvmaf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c -index 14c3216b3a..e7273b6d1d 100644 +index 4d49127..bd6f451 100644 --- a/libavfilter/vf_libvmaf.c +++ b/libavfilter/vf_libvmaf.c @@ -72,7 +72,7 @@ typedef struct LIBVMAFContext { @@ -18,8 +9,5 @@ index 14c3216b3a..e7273b6d1d 100644 - {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, + {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, {"log_path", "Set the file path to be used to store logs.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, - {"log_fmt", "Set the format of the log (xml or json).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, + {"log_fmt", "Set the format of the log (csv, json or xml).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, {"enable_transform", "Enables transform for computing vmaf.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, --- -2.26.2 - diff --git a/fix_ppc_build.patch b/fix_ppc_build.patch deleted file mode 100644 index 3c35dc4..0000000 --- a/fix_ppc_build.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/libswscale/ppc/swscale_vsx.c -+++ b/libswscale/ppc/swscale_vsx.c -@@ -154,7 +154,7 @@ - } - } - --static void yuv2plane1_nbps_vsx(const int16_t *src, uint16_t *dest, int dstW, -+static av_always_inline void yuv2plane1_nbps_vsx(const int16_t *src, uint16_t *dest, int dstW, - int big_endian, int output_bits) - { - const int dst_u = -(uintptr_t)dest & 7; -@@ -273,7 +273,7 @@ - } - } - --static void yuv2plane1_16_vsx(const int32_t *src, uint16_t *dest, int dstW, -+static av_always_inline void yuv2plane1_16_vsx(const int32_t *src, uint16_t *dest, int dstW, - int big_endian, int output_bits) - { - const int dst_u = -(uintptr_t)dest & 7; -