diff --git a/README.md b/README.md index bdb98eb..21825d3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ # ffmpeg6 +FFmpeg is a very fast video and audio converter. +It can also grab from a live audio/video source. +The command line interface is designed to be intuitive, in the sense that ffmpeg tries to figure out all the parameters, when possible. +You have usually to give only the target bitrate you want. +FFmpeg can also convert from any sample rate to any other, and resize video on the fly with a high quality polyphase filter. + diff --git a/ffmpeg-5.1-add-av_stream_get_first_dts-for-chromium.patch b/ffmpeg-5.1-add-av_stream_get_first_dts-for-chromium.patch new file mode 100644 index 0000000..20ea725 --- /dev/null +++ b/ffmpeg-5.1-add-av_stream_get_first_dts-for-chromium.patch @@ -0,0 +1,31 @@ +diff '--color=auto' -rupN ffmpeg.orig/libavformat/avformat.h ffmpeg/libavformat/avformat.h +--- ffmpeg.orig/libavformat/avformat.h 2022-08-19 17:42:47.323422603 +0200 ++++ ffmpeg/libavformat/avformat.h 2022-08-19 17:42:51.347130436 +0200 +@@ -1128,6 +1128,10 @@ struct AVCodecParserContext *av_stream_g + */ + int64_t av_stream_get_end_pts(const AVStream *st); + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st); ++// Chromium: We use the internal field first_dts ^^^ ++ + #define AV_PROGRAM_RUNNING 1 + + /** +diff '--color=auto' -rupN ffmpeg.orig/libavformat/mux_utils.c ffmpeg/libavformat/mux_utils.c +--- ffmpeg.orig/libavformat/mux_utils.c 2022-08-19 17:42:47.346758108 +0200 ++++ ffmpeg/libavformat/mux_utils.c 2022-08-19 17:47:28.549589002 +0200 +@@ -37,6 +37,13 @@ int64_t av_stream_get_end_pts(const AVSt + return AV_NOPTS_VALUE; + } + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st) ++{ ++ return cffstream(st)->first_dts; ++} ++// Chromium: We use the internal field first_dts ^^^ ++ + int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, + int std_compliance) + { diff --git a/ffmpeg6-6.1.1-gcc-14.patch b/ffmpeg6-6.1.1-gcc-14.patch new file mode 100644 index 0000000..c968e47 --- /dev/null +++ b/ffmpeg6-6.1.1-gcc-14.patch @@ -0,0 +1,101 @@ +From 2f24f10d9cf34ddce274496c4daa73f732d370c1 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Wed, 20 Dec 2023 12:32:43 +0000 +Subject: [PATCH] libavcodec: fix -Wint-conversion in vulkan +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +FIx warnings (soon to be errors in GCC 14, already so in Clang 15): +``` +src/libavcodec/vulkan_av1.c: In function ‘vk_av1_create_params’: +src/libavcodec/vulkan_av1.c:183:43: error: initialization of ‘long long unsigned int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] + 183 | .videoSessionParametersTemplate = NULL, + | ^~~~ +src/libavcodec/vulkan_av1.c:183:43: note: (near initialization for ‘(anonymous).videoSessionParametersTemplate’) +``` + +Use Vulkan's VK_NULL_HANDLE instead of bare NULL. + +Fix Trac ticket #10724. + +Was reported downstream in Gentoo at https://bugs.gentoo.org/919067. + +Signed-off-by: Sam James +--- + libavcodec/vulkan_av1.c | 2 +- + libavcodec/vulkan_decode.c | 6 +++--- + libavcodec/vulkan_h264.c | 2 +- + libavcodec/vulkan_hevc.c | 2 +- + libavcodec/vulkan_video.c | 2 +- + 5 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c +index 4998bf7ebc55f..9730e4b08dd40 100644 +--- a/libavcodec/vulkan_av1.c ++++ b/libavcodec/vulkan_av1.c +@@ -180,7 +180,7 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf) + .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, + .pNext = &av1_params, + .videoSession = ctx->common.session, +- .videoSessionParametersTemplate = NULL, ++ .videoSessionParametersTemplate = VK_NULL_HANDLE, + }; + + err = ff_vk_decode_create_params(buf, avctx, ctx, &session_params_create); +diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c +index a89d84fcaa972..fdbcbb450a1e0 100644 +--- a/libavcodec/vulkan_decode.c ++++ b/libavcodec/vulkan_decode.c +@@ -188,9 +188,9 @@ int ff_vk_decode_prepare_frame(FFVulkanDecodeContext *dec, AVFrame *pic, + return 0; + + vkpic->dpb_frame = NULL; +- vkpic->img_view_ref = NULL; +- vkpic->img_view_out = NULL; +- vkpic->img_view_dest = NULL; ++ vkpic->img_view_ref = VK_NULL_HANDLE; ++ vkpic->img_view_out = VK_NULL_HANDLE; ++ vkpic->img_view_dest = VK_NULL_HANDLE; + + vkpic->destroy_image_view = vk->DestroyImageView; + vkpic->wait_semaphores = vk->WaitSemaphores; +diff --git a/libavcodec/vulkan_h264.c b/libavcodec/vulkan_h264.c +index e727aafb162d3..39c123ddca57e 100644 +--- a/libavcodec/vulkan_h264.c ++++ b/libavcodec/vulkan_h264.c +@@ -315,7 +315,7 @@ static int vk_h264_create_params(AVCodecContext *avctx, AVBufferRef **buf) + .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, + .pNext = &h264_params, + .videoSession = ctx->common.session, +- .videoSessionParametersTemplate = NULL, ++ .videoSessionParametersTemplate = VK_NULL_HANDLE, + }; + + /* SPS list */ +diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c +index 99fdcf3b45839..033172cbd6958 100644 +--- a/libavcodec/vulkan_hevc.c ++++ b/libavcodec/vulkan_hevc.c +@@ -653,7 +653,7 @@ static int vk_hevc_create_params(AVCodecContext *avctx, AVBufferRef **buf) + .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, + .pNext = &h265_params, + .videoSession = ctx->common.session, +- .videoSessionParametersTemplate = NULL, ++ .videoSessionParametersTemplate = VK_NULL_HANDLE, + }; + + HEVCHeaderSet *hdr; +diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c +index 5fa8292b28eaf..fb20315db4bbf 100644 +--- a/libavcodec/vulkan_video.c ++++ b/libavcodec/vulkan_video.c +@@ -287,7 +287,7 @@ av_cold void ff_vk_video_common_uninit(FFVulkanContext *s, + if (common->session) { + vk->DestroyVideoSessionKHR(s->hwctx->act_dev, common->session, + s->hwctx->alloc); +- common->session = NULL; ++ common->session = VK_NULL_HANDLE; + } + + if (common->nb_mem && common->mem) diff --git a/ffmpeg6-6.1.1-vulkan-headers-1.3.285.patch b/ffmpeg6-6.1.1-vulkan-headers-1.3.285.patch new file mode 100644 index 0000000..93b8ac1 --- /dev/null +++ b/ffmpeg6-6.1.1-vulkan-headers-1.3.285.patch @@ -0,0 +1,124 @@ +From fef22c87ada4517441701e6e61e062c9f4399c8e Mon Sep 17 00:00:00 2001 +From: =?utf8?q?Jan=20Ekstr=C3=B6m?= +Date: Wed, 14 Feb 2024 22:40:54 +0200 +Subject: [PATCH] {avcodec,tests}: rename the bundled Mesa AV1 vulkan video + headers + +This together with adjusting the inclusion define allows for the +build to not fail with latest Vulkan-Headers that contain the +stabilized Vulkan AV1 decoding definitions. + +Compilation fails currently as the AV1 header is getting included +via hwcontext_vulkan.h -> -> vulkan_core.h, which +finally includes vk_video/vulkan_video_codec_av1std.h and the decode +header, leading to the bundled header to never defining anything +due to the inclusion define being the same. + +This fix is imperfect, as it leads to additional re-definition +warnings for things such as +VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION. , but it is +not clear how to otherwise have the bundled version trump the +actually standardized one for a short-term compilation fix. + +(cherry picked from commit e06ce6d2b45edac4a2df04f304e18d4727417d24) +--- + libavcodec/Makefile | 4 ++-- + libavcodec/vulkan_video.h | 4 ++-- + ...v1std_decode.h => vulkan_video_codec_av1std_decode_mesa.h} | 4 ++-- + ..._video_codec_av1std.h => vulkan_video_codec_av1std_mesa.h} | 4 ++-- + tests/ref/fate/source | 4 ++-- + 5 files changed, 10 insertions(+), 10 deletions(-) + rename libavcodec/{vulkan_video_codec_av1std_decode.h => vulkan_video_codec_av1std_decode_mesa.h} (89%) + rename libavcodec/{vulkan_video_codec_av1std.h => vulkan_video_codec_av1std_mesa.h} (99%) + +diff --git a/libavcodec/Makefile b/libavcodec/Makefile +index ec57e53e30..eb25707ef5 100644 +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -1284,7 +1284,7 @@ SKIPHEADERS += %_tablegen.h \ + aacenc_quantization.h \ + aacenc_quantization_misc.h \ + bitstream_template.h \ +- vulkan_video_codec_av1std.h \ ++ vulkan_video_codec_av1std_mesa.h \ + $(ARCH)/vpx_arith.h \ + + SKIPHEADERS-$(CONFIG_AMF) += amfenc.h +@@ -1306,7 +1306,7 @@ SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h + SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_hevc.h vaapi_encode.h + SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h + SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h +-SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h ++SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode_mesa.h + SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h + SKIPHEADERS-$(CONFIG_ZLIB) += zlib_wrapper.h + +diff --git a/libavcodec/vulkan_video.h b/libavcodec/vulkan_video.h +index b28e3fe0bd..51f44dd543 100644 +--- a/libavcodec/vulkan_video.h ++++ b/libavcodec/vulkan_video.h +@@ -23,8 +23,8 @@ + #include "vulkan.h" + + #include +-#include "vulkan_video_codec_av1std.h" +-#include "vulkan_video_codec_av1std_decode.h" ++#include "vulkan_video_codec_av1std_mesa.h" ++#include "vulkan_video_codec_av1std_decode_mesa.h" + + #define CODEC_VER_MAJ(ver) (ver >> 22) + #define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1)) +diff --git a/libavcodec/vulkan_video_codec_av1std_decode.h b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h +similarity index 89% +rename from libavcodec/vulkan_video_codec_av1std_decode.h +rename to libavcodec/vulkan_video_codec_av1std_decode_mesa.h +index a697c00593..e2f37b4e6e 100644 +--- a/libavcodec/vulkan_video_codec_av1std_decode.h ++++ b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h +@@ -14,8 +14,8 @@ + * limitations under the License. + */ + +-#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ +-#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1 ++#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ ++#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ 1 + + /* + ** This header is NOT YET generated from the Khronos Vulkan XML API Registry. +diff --git a/libavcodec/vulkan_video_codec_av1std.h b/libavcodec/vulkan_video_codec_av1std_mesa.h +similarity index 99% +rename from libavcodec/vulkan_video_codec_av1std.h +rename to libavcodec/vulkan_video_codec_av1std_mesa.h +index c46236c457..c91589eee2 100644 +--- a/libavcodec/vulkan_video_codec_av1std.h ++++ b/libavcodec/vulkan_video_codec_av1std_mesa.h +@@ -14,8 +14,8 @@ + * limitations under the License. + */ + +-#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_ +-#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1 ++#ifndef VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ ++#define VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ 1 + + /* + ** This header is NOT YET generated from the Khronos Vulkan XML API Registry. +diff --git a/tests/ref/fate/source b/tests/ref/fate/source +index c575789dd5..8bb58b61f1 100644 +--- a/tests/ref/fate/source ++++ b/tests/ref/fate/source +@@ -23,8 +23,8 @@ compat/djgpp/math.h + compat/float/float.h + compat/float/limits.h + libavcodec/bitstream_template.h +-libavcodec/vulkan_video_codec_av1std.h +-libavcodec/vulkan_video_codec_av1std_decode.h ++libavcodec/vulkan_video_codec_av1std_decode_mesa.h ++libavcodec/vulkan_video_codec_av1std_mesa.h + tools/decode_simple.h + Use of av_clip() where av_clip_uintp2() could be used: + Use of av_clip() where av_clip_intp2() could be used: +-- +2.25.1 + diff --git a/ffmpeg6.spec b/ffmpeg6.spec new file mode 100644 index 0000000..7fa7399 --- /dev/null +++ b/ffmpeg6.spec @@ -0,0 +1,869 @@ +%define enable_gpl 1 +%define enable_non_free 1 +%define buildver %{version} + +Name: ffmpeg6 +Epoch: 2 +Version: 6.1.1 +Release: 2mamba +Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://ffmpeg.org/ +Source: http://ffmpeg.mplayerhq.hu/releases/ffmpeg-%{version}.tar.bz2 +Patch5: ffmpeg-5.1-add-av_stream_get_first_dts-for-chromium.patch +Patch6: ffmpeg6-6.1.1-vulkan-headers-1.3.285.patch +Patch7: ffmpeg6-6.1.1-gcc-14.patch +License: LGPL, GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: ldconfig +BuildRequires: libSDL2-devel +BuildRequires: libX11-devel +BuildRequires: libXext-devel +BuildRequires: libXv-devel +BuildRequires: libalsa-devel +BuildRequires: libass-devel +BuildRequires: libbluray-devel +BuildRequires: libbzip2-devel +%ifarch %{ix86} x86_64 +BuildRequires: libcrystalhd-devel +%endif +BuildRequires: libdc1394-devel +BuildRequires: libfontconfig-devel +BuildRequires: libfreetype-devel +BuildRequires: libgnutls-devel +BuildRequires: libgsm-devel +BuildRequires: liblame-devel +BuildRequires: liblzma-devel +BuildRequires: libmodplug-devel +BuildRequires: libopencore-amr-devel +BuildRequires: libopenjpeg-devel +BuildRequires: libopus-devel +BuildRequires: libpulseaudio-devel +BuildRequires: librtmp-devel +BuildRequires: libspeex-devel +BuildRequires: libtheora-devel +BuildRequires: libv4l-devel +BuildRequires: libva-devel +BuildRequires: libvdpau-devel +BuildRequires: libvorbis-devel +BuildRequires: libvpx-devel +BuildRequires: libx264-devel +BuildRequires: libxcb-devel +BuildRequires: libxvidcore-devel +BuildRequires: libz-devel +## AUTOBUILDREQ-END +BuildRequires: liborc-devel +BuildRequires: libogg-devel +BuildRequires: libfaad2-devel +BuildRequires: libraw1394-devel +BuildRequires: liba52dec-devel +BuildRequires: yasm-devel +BuildRequires: ldconfig +# texi2html required +BuildRequires: tetex >= 3.0 +BuildRequires: libass-devel +BuildRequires: libenca-devel +Obsoletes: libffmpeg < 1:5.0 +Obsoletes: libav < 1:5.0 + +%description +FFmpeg is a very fast video and audio converter. +It can also grab from a live audio/video source. +The command line interface is designed to be intuitive, in the sense that ffmpeg tries to figure out all the parameters, when possible. +You have usually to give only the target bitrate you want. +FFmpeg can also convert from any sample rate to any other, and resize video on the fly with a high quality polyphase filter. + +%package examples +Summary: ffmpeg coding examples +Group: Development/Libraries + +%description examples +ffmpeg coding examples. + +%package presets +Summary: Preset configuration files used by libavcodec +Group: System/Libraries +Provides: ffmpegpresets + +%description presets +Preset configuration files used by libavcodec. + +%package -n libswscale-ffmpeg6 +Summary: ffmpeg video scaling library +Group: System/Libraries + +%description -n libswscale-ffmpeg6 +ffmpeg video scaling library. + +%package -n libswscale-ffmpeg6-devel +Summary: Shared header files and static libraries part of ffmpeg +Group: Development/Libraries +Requires: libswscale-ffmpeg6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libswscale-ffmpeg6-devel +ffmpeg video scaling library. +This package contains the header files and static libraries needed to compile applications or shared objects that use libswscale + +%package -n libswresample-ffmpeg6 +Summary: ffmpeg resampling library +Group: System/Libraries + +%description -n libswresample-ffmpeg6 +ffmpeg resampling library. + +%package -n libswresample-ffmpeg6-devel +Summary: Shared header files and static libraries part of ffmpeg +Group: Development/Libraries +Requires: libswresample-ffmpeg6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libswresample-ffmpeg6-devel +ffmpeg resampling library. +This package contains the header files and static libraries needed to compile applications or shared objects that use libswscale + +%package -n libavcodec-ffmpeg6 +Summary: ffmpeg library implementing various Audio/Video codecs +Group: System/Libraries +Requires: ffmpegpresets + +%description -n libavcodec-ffmpeg6 +ffmpeg library implementing various Audio/Video codecs. + +%package -n libavcodec-ffmpeg6-devel +Summary: Shared header files and static libraries part of ffmpeg +Group: Development/Libraries +Requires: libavcodec-ffmpeg6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libavcodec-ffmpeg6-devel +ffmpeg library implementing various Audio/Video codecs. +This package contains the header files and static libraries needed to compile applications or shared objects that use libavcodec + +%package -n libavdevice-ffmpeg6 +Summary: ffmpeg device handling library +Group: System/Libraries + +%description -n libavdevice-ffmpeg6 +ffmpeg device handling library. + +%package -n libavdevice-ffmpeg6-devel +Summary: Shared header files and static libraries part of ffmpeg +Group: Development/Libraries +Requires: libavdevice-ffmpeg6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libavdevice-ffmpeg6-devel +ffmpeg device handling library. +This package contains the header files and static libraries needed to compile applications or shared objects that use libavdevice. + +%package -n libavfilter-ffmpeg6 +Summary: ffmpeg filtering library +Group: System/Libraries + +%description -n libavfilter-ffmpeg6 +ffmpeg filtering library. + +%package -n libavfilter-ffmpeg6-devel +Summary: Shared header files and static libraries part of ffmpeg +Group: Development/Libraries +Requires: libavfilter-ffmpeg6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libavfilter-ffmpeg6-devel +ffmpeg filtering library. +This package contains the header files and static libraries needed to compile applications or shared objects that use libavformat + +%package -n libavformat-ffmpeg6 +Summary: ffmpeg format library +Group: System/Libraries + +%description -n libavformat-ffmpeg6 +ffmpeg format library. + +%package -n libavformat-ffmpeg6-devel +Summary: Shared header files and static libraries part of ffmpeg +Group: Development/Libraries +Requires: libavformat-ffmpeg6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libavformat-ffmpeg6-devel +ffmpeg format library. +This package contains the header files and static libraries needed to compile applications or shared objects that use libavformat + +%package -n libavutil-ffmpeg6 +Summary: Shared library part of ffmpeg +Group: System/Libraries + +%description -n libavutil-ffmpeg6 +Shared library part of ffmpeg + +%package -n libavutil-ffmpeg6-devel +Summary: Shared header files and static libraries part of ffmpeg +Group: Development/Libraries +Requires: libavutil-ffmpeg6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libavutil-ffmpeg6-devel +This is the common utility library from the ffmpeg project. +It is required by all other ffmpeg libraries. +This package contains the header files and static libraries needed to compile applications or shared objects that use libavutil + +%package -n libpostproc-ffmpeg6 +Summary: Video postprocessing library from ffmpeg +Group: System/Libraries + +%description -n libpostproc-ffmpeg6 +FFmpeg is a very fast video and audio converter. It can also grab from a live audio/video source. +This package contains only ffmpeg's postproc post-processing library which other projects such as transcode may use. Install this package if you intend to use MPlayer, transcode or other similar programs. + +%package -n libpostproc-ffmpeg6-devel +Summary: Video postprocessing library from ffmpeg +Group: Development/Libraries +Requires: libpostproc-ffmpeg6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libpostproc-ffmpeg6-devel +FFmpeg is a very fast video and audio converter. It can also grab from a live audio/video source. +This package contains only ffmpeg's postproc post-processing headers and static libraries which other projects such as transcode may use. Install this package if you intend to use MPlayer, transcode or other similar programs. + +%package -n libavresample-ffmpeg6 +Summary: ffmpeg resample library +Group: System/Libraries + +%description -n libavresample-ffmpeg6 +FFmpeg resample library. + +%package -n libavresample-ffmpeg6-devel +Summary: Shared header files and static libraries part of ffmpeg libavresample +Group: System/Libraries +Requires: libavresample-ffmpeg6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libavresample-ffmpeg6-devel +FFmpeg resample library. +This package contains the header files and static libraries needed to compile applications or shared objects that use libavutil + +%package devel +Summary: Virtual package that installs all the FFmpeg development packages +Group: Development/Libraries +Requires: libavcodec-ffmpeg6-devel +Requires: libavdevice-ffmpeg6-devel +Requires: libavfilter-ffmpeg6-devel +Requires: libavformat-ffmpeg6-devel +Requires: libavutil-ffmpeg6-devel +Requires: libpostproc-ffmpeg6-devel +Requires: libswscale-ffmpeg6-devel +Requires: libswresample-ffmpeg6-devel + +%description devel +This is a virtual package that contains the dependencies necessary for installing all the FFmpeg development packages. + +%debug_package + +%prep +%setup -q -n ffmpeg-%{buildver} +#-D -T +#:<< _EOF +%define _default_patch_fuzz 2 +%patch 5 -p1 -b .add-av_stream_get_first_dts-for-chromium +%patch 6 -p1 -b .vulkan-headers-1.3.285 +%patch 7 -p1 -b .gcc-14 + +%build +# configure not generated by autoconf +# -D__LINUX_USER__ is required by crystalhd +export CFLAGS="%{optflags} -fno-unit-at-a-time -D__LINUX_USER__" +./configure \ + --prefix="%{_prefix}" \ + --libdir="%{_libdir}/ffmpeg6" \ + --shlibdir="%{_libdir}/ffmpeg6" \ + --incdir="%{_includedir}/ffmpeg6" \ + --mandir="%{_mandir}" \ + --enable-libmp3lame \ + --enable-libvorbis \ + --enable-libtheora \ + --enable-libgsm \ + --enable-libdc1394 \ + --enable-shared \ + --enable-pthreads \ + --disable-stripping \ + --enable-libopenjpeg \ + --enable-libspeex \ + --enable-swscale \ + --enable-libass \ + --enable-libbluray \ + --enable-libfreetype \ + --enable-libmodplug \ + --enable-libopenjpeg \ + --enable-libopus \ + --enable-libpulse \ + --enable-librtmp \ + --enable-libv4l2 \ + --enable-libvpx \ + --enable-libxvid \ + --enable-pic \ + --enable-postproc \ + --enable-runtime-cpudetect \ + --enable-shared \ + --enable-swresample \ + --enable-vdpau \ +%if %enable_gpl + --enable-gpl \ + --enable-fontconfig \ + --enable-gnutls \ + --enable-version3 \ + --enable-libxvid \ + --enable-postproc \ + --enable-libopencore-amrnb \ + --enable-libopencore-amrwb \ +%if %enable_non_free + --enable-nonfree \ +%endif +%endif + +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall \ + shlibdir="%{buildroot}%{_libdir}" \ + libdir="%{buildroot}%{_libdir}" + +# Move libs to %{_libdir}, except the .so symlinks +(cd %{buildroot} +for f in usr/%{_lib}/ffmpeg6/*; do + if [[ $f == *.so ]]; then + ln -sf ../$(basename $(readlink $f)) $f + elif [[ ! -d $f && ! $f == *.a ]]; then + mv $f usr/%{_lib} + fi +done +) + +rm -rf %{buildroot}%{_datadir} + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n libavcodec-ffmpeg6 -p /sbin/ldconfig +%postun -n libavcodec-ffmpeg6 -p /sbin/ldconfig + +%post -n libavdevice-ffmpeg6 -p /sbin/ldconfig +%postun -n libavdevice-ffmpeg6 -p /sbin/ldconfig + +%post -n libavfilter-ffmpeg6 -p /sbin/ldconfig +%postun -n libavfilter-ffmpeg6 -p /sbin/ldconfig + +%post -n libavformat-ffmpeg6 -p /sbin/ldconfig +%postun -n libavformat-ffmpeg6 -p /sbin/ldconfig + +%post -n libavresample-ffmpeg6 -p /sbin/ldconfig +%postun -n libavresample-ffmpeg6 -p /sbin/ldconfig + +%post -n libavutil-ffmpeg6 -p /sbin/ldconfig +%postun -n libavutil-ffmpeg6 -p /sbin/ldconfig + +%post -n libpostproc-ffmpeg6 -p /sbin/ldconfig +%postun -n libpostproc-ffmpeg6 -p /sbin/ldconfig + +%post -n libswscale-ffmpeg6 -p /sbin/ldconfig +%postun -n libswscale-ffmpeg6 -p /sbin/ldconfig + +%post -n libswresample-ffmpeg6 -p /sbin/ldconfig +%postun -n libswresample-ffmpeg6 -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/ffmpeg +%{_bindir}/ffplay +%{_bindir}/ffprobe +%doc CREDITS + +#%files examples +#%defattr(-,root,root) +#%dir %{_datadir}/ffmpeg/examples +#%{_datadir}/ffmpeg/examples/Makefile +#%{_datadir}/ffmpeg/examples/*.c + +#%files presets +#%defattr(-,root,root) +#%dir %{_datadir}/ffmpeg +#%{_datadir}/ffmpeg/libvpx-*.ffpreset + +%files -n libavcodec-ffmpeg6 +%defattr(-,root,root) +%{_libdir}/libavcodec.so.* + +%files -n libavcodec-ffmpeg6-devel +%defattr(-,root,root) +%dir %{_includedir}/ffmpeg6/libavcodec +%{_includedir}/ffmpeg6/libavcodec/* +%{_libdir}/ffmpeg6/libavcodec.a +%{_libdir}/ffmpeg6/libavcodec.so +%{_libdir}/ffmpeg6/pkgconfig/libavcodec.pc + +%files -n libavdevice-ffmpeg6 +%defattr(-,root,root) +%{_libdir}/libavdevice.so.* + +%files -n libavdevice-ffmpeg6-devel +%defattr(-,root,root) +%dir %{_includedir}/ffmpeg6/libavdevice +%{_includedir}/ffmpeg6/libavdevice/*.h +%{_libdir}/ffmpeg6/libavdevice.a +%{_libdir}/ffmpeg6/libavdevice.so +%{_libdir}/ffmpeg6/pkgconfig/libavdevice.pc + +%files -n libavfilter-ffmpeg6 +%defattr(-,root,root) +%{_libdir}/libavfilter.so.* + +%files -n libavfilter-ffmpeg6-devel +%defattr(-,root,root) +%dir %{_includedir}/ffmpeg6/libavfilter +%{_includedir}/ffmpeg6/libavfilter/*.h +%{_libdir}/ffmpeg6/libavfilter.a +%{_libdir}/ffmpeg6/libavfilter.so +%{_libdir}/ffmpeg6/pkgconfig/libavfilter.pc + +%files -n libavformat-ffmpeg6 +%defattr(-,root,root) +%{_libdir}/libavformat.so.* + +%files -n libavformat-ffmpeg6-devel +%defattr(-,root,root) +%dir %{_includedir}/ffmpeg6/libavformat +%{_includedir}/ffmpeg6/libavformat/*.h +%{_libdir}/ffmpeg6/libavformat.a +%{_libdir}/ffmpeg6/libavformat.so +%{_libdir}/ffmpeg6/pkgconfig/libavformat.pc + +%files -n libavutil-ffmpeg6 +%defattr(-,root,root) +%{_libdir}/libavutil.so.* + +%files -n libavutil-ffmpeg6-devel +%defattr(-,root,root) +%dir %{_includedir}/ffmpeg6/libavutil +%{_includedir}/ffmpeg6/libavutil/*.h +%{_libdir}/ffmpeg6/libavutil.a +%{_libdir}/ffmpeg6/libavutil.so +%{_libdir}/ffmpeg6/pkgconfig/libavutil.pc + +%files -n libpostproc-ffmpeg6 +%defattr(-,root,root) +%{_libdir}/libpostproc.so.* + +%files -n libpostproc-ffmpeg6-devel +%defattr(-,root,root) +%dir %{_includedir}/ffmpeg6/libpostproc +%{_includedir}/ffmpeg6/libpostproc/*.h +%{_libdir}/ffmpeg6/libpostproc.a +%{_libdir}/ffmpeg6/libpostproc.so +%{_libdir}/ffmpeg6/pkgconfig/libpostproc.pc + +%files -n libswscale-ffmpeg6 +%defattr(-,root,root) +%{_libdir}/libswscale.so.* + +%files -n libswscale-ffmpeg6-devel +%defattr(-,root,root) +%dir %{_includedir}/ffmpeg6/libswscale +%{_includedir}/ffmpeg6/libswscale/*.h +%{_libdir}/ffmpeg6/libswscale.a +%{_libdir}/ffmpeg6/libswscale.so +%{_libdir}/ffmpeg6/pkgconfig/libswscale.pc + +%files -n libswresample-ffmpeg6 +%defattr(-,root,root) +%{_libdir}/libswresample.so.* + +%files -n libswresample-ffmpeg6-devel +%defattr(-,root,root) +%dir %{_includedir}/ffmpeg6/libswresample +%{_includedir}/ffmpeg6/libswresample/*.h +%{_libdir}/ffmpeg6/libswresample.a +%{_libdir}/ffmpeg6/libswresample.so +%{_libdir}/ffmpeg6/pkgconfig/libswresample.pc + +%files devel +%defattr(-,root,root) +#%dir %{_docdir}/ffmpeg +#%{_docdir}/ffmpeg/* + +%changelog +* Mon May 27 2024 Silvan Calarco 6.1.1-2mamba +- legacy package + +* Sun Dec 31 2023 Automatic Build System 6.1.1-1mamba +- automatic version update by autodist + +* Tue Nov 21 2023 Automatic Build System 6.1-1mamba +- automatic version update by autodist + +* Mon Nov 20 2023 Silvan Calarco 6.0.1-1mamba +- update to 6.0.1 +- epoch bump since 6.1 crashes VLC in OpenGL/VAAPI backend for VDPAU for hardware decoding + +* Tue Mar 07 2023 Automatic Build System 6.0-1mamba +- automatic version update by autodist + +* Mon Sep 26 2022 Automatic Build System 5.1.2-1mamba +- automatic version update by autodist + +* Thu Sep 01 2022 Automatic Build System 5.1.1-1mamba +- automatic version update by autodist + +* Tue Aug 30 2022 Silvan Calarco 5.1-2mamba +- reapply add-av_stream_get_first_dts-for-chromium patch for 5.1 + +* Wed Aug 03 2022 Automatic Build System 5.1-1mamba +- automatic version update by autodist + +* Tue Apr 05 2022 Automatic Build System 5.0.1-1mamba +- automatic version update by autodist + +* Mon Feb 21 2022 Silvan Calarco 5.0-2mamba +- patched to add av_stream_get-first_dts function for chromium + +* Mon Jan 24 2022 Automatic Build System 5.0-1mamba +- automatic version update by autodist + +* Mon Oct 25 2021 Automatic Build System 4.4.1-1mamba +- automatic version update by autodist + +* Fri Apr 09 2021 Automatic Build System 4.4-1mamba +- automatic version update by autodist + +* Sun Feb 21 2021 Automatic Build System 4.3.2-1mamba +- automatic version update by autodist + +* Sat Jul 11 2020 Automatic Build System 4.3.1-1mamba +- automatic version update by autodist + +* Wed Jun 17 2020 Automatic Build System 4.3-1mamba +- automatic version update by autodist + +* Thu May 21 2020 Automatic Build System 4.2.3-1mamba +- automatic version update by autodist + +* Wed Jan 01 2020 Automatic Build System 4.2.2-1mamba +- automatic version update by autodist + +* Sat Sep 07 2019 Automatic Build System 4.2.1-1mamba +- automatic version update by autodist + +* Tue Aug 06 2019 Automatic Build System 4.2-1mamba +- automatic version update by autodist + +* Tue Jul 09 2019 Automatic Build System 4.1.4-1mamba +- automatic version update by autodist + +* Mon Apr 01 2019 Automatic Build System 4.1.3-1mamba +- automatic version update by autodist + +* Sat Mar 23 2019 Automatic Build System 4.1.2-1mamba +- automatic version update by autodist + +* Sun Feb 10 2019 Automatic Build System 4.1.1-1mamba +- automatic version update by autodist + +* Fri Dec 21 2018 Silvan Calarco 4.1-3mamba +- obsolete -libav packages + +* Fri Dec 07 2018 Silvan Calarco 4.1-2mamba +- rebuilt with debug package + +* Tue Nov 06 2018 Automatic Build System 4.1-1mamba +- automatic version update by autodist + +* Sat Nov 03 2018 Automatic Build System 4.0.3-1mamba +- automatic version update by autodist + +* Tue Aug 28 2018 Automatic Build System 4.0.2-1mamba +- automatic version update by autodist + +* Sun Feb 12 2017 Automatic Build System 3.2.4-1mamba +- automatic version update by autodist + +* Sun Feb 12 2017 Automatic Build System 3.2.3-1mamba +- automatic version update by autodist + +* Wed Dec 07 2016 Automatic Build System 3.2.2-1mamba +- automatic version update by autodist + +* Sat Oct 29 2016 Automatic Build System 3.2-1mamba +- automatic version update by autodist + +* Sat Oct 22 2016 Automatic Build System 3.1.5-1mamba +- automatic version update by autodist + +* Sat Oct 01 2016 Automatic Build System 3.1.4-1mamba +- automatic version update by autodist + +* Fri Aug 26 2016 Automatic Build System 3.1.3-1mamba +- automatic version update by autodist + +* Tue Aug 09 2016 Automatic Build System 3.1.2-1mamba +- automatic version update by autodist + +* Fri Jul 01 2016 Automatic Build System 3.1.1-1mamba +- automatic version update by autodist + +* Mon Jun 27 2016 Automatic Build System 3.1-1mamba +- automatic version update by autodist + +* Thu Apr 28 2016 Automatic Build System 3.0.2-1mamba +- automatic version update by autodist + +* Wed Mar 30 2016 Automatic Build System 3.0.1-1mamba +- automatic version update by autodist + +* Mon Feb 15 2016 Automatic Build System 3.0-1mamba +- automatic version update by autodist + +* Mon Feb 01 2016 Automatic Build System 2.8.6-1mamba +- automatic version update by autodist + +* Sat Jan 16 2016 Automatic Build System 2.8.5-2mamba +- automatic version update by autodist + +* Sat Jan 16 2016 Automatic Build System 2.8.5-1mamba +- automatic version update by autodist + +* Sun Dec 20 2015 Automatic Build System 2.8.4-1mamba +- automatic version update by autodist + +* Fri Nov 27 2015 Automatic Build System 2.8.3-1mamba +- automatic version update by autodist + +* Thu Nov 12 2015 Automatic Build System 2.8.2-1mamba +- automatic version update by autodist + +* Wed Oct 14 2015 Automatic Build System 2.8.1-1mamba +- automatic version update by autodist + +* Wed Sep 09 2015 Automatic Build System 2.8-1mamba +- automatic version update by autodist + +* Tue Aug 18 2015 Automatic Build System 2.7.2-1mamba +- automatic version update by autodist + +* Mon Dec 01 2014 Automatic Build System 2.4.4-1mamba +- automatic version update by autodist + +* Sun Nov 02 2014 Automatic Build System 2.4.3-1mamba +- automatic version update by autodist + +* Sun Oct 05 2014 Automatic Build System 2.4.2-1mamba +- automatic version update by autodist + +* Mon Sep 22 2014 Automatic Build System 2.4.1-1mamba +- automatic version update by autodist + +* Mon Sep 15 2014 Automatic Build System 2.4-1mamba +- automatic version update by autodist + +* Mon Aug 18 2014 Automatic Build System 2.3.3-1mamba +- automatic version update by autodist + +* Mon Aug 11 2014 Automatic Build System 2.3.2-1mamba +- automatic version update by autodist + +* Thu Jul 31 2014 Automatic Build System 2.3.1-1mamba +- automatic version update by autodist + +* Tue Jul 22 2014 Automatic Build System 2.3-1mamba +- automatic version update by autodist + +* Tue Jul 15 2014 Automatic Build System 2.2.5-1mamba +- automatic version update by autodist + +* Tue Jun 24 2014 Automatic Build System 2.2.4-1mamba +- automatic version update by autodist + +* Thu Jun 05 2014 Automatic Build System 2.2.3-1mamba +- automatic version update by autodist + +* Wed May 14 2014 Silvan Calarco 2.2.2-2mamba +- obsolete packages with same library version coming from legacy ffmpeg1 + +* Tue May 06 2014 Automatic Build System 2.2.2-1mamba +- automatic version update by autodist + +* Thu Apr 10 2014 Automatic Build System 2.2.1-1mamba +- automatic version update by autodist + +* Tue Mar 25 2014 Silvan Calarco 2.2-2mamba +- enable build of libavresample and many other support options + +* Mon Mar 24 2014 Automatic Build System 2.2-1mamba +- automatic version update by autodist + +* Mon Feb 24 2014 Automatic Build System 2.1.4-1mamba +- automatic version update by autodist + +* Thu Jan 16 2014 Automatic Build System 2.1.3-1mamba +- automatic version update by autodist + +* Tue Jan 14 2014 Automatic Build System 2.1.2-1mamba +- automatic version update by autodist + +* Wed Nov 20 2013 Automatic Build System 2.1.1-1mamba +- automatic version update by autodist + +* Tue Oct 29 2013 Automatic Build System 2.1-1mamba +- automatic version update by autodist + +* Wed Oct 09 2013 Automatic Build System 2.0.2-1mamba +- automatic version update by autodist + +* Sun Aug 11 2013 Automatic Build System 2.0.1-1mamba +- automatic version update by autodist + +* Thu Jul 11 2013 Automatic Build System 2.0-1mamba +- automatic version update by autodist + +* Sun Jun 23 2013 openmamba WebBuild System 1.2.1-2mamba +- add a virtual package that help installing all the ffmpeg development packages + +* Wed May 29 2013 Automatic Build System 1.2.1-1mamba +- automatic version update by autodist + +* Tue Mar 19 2013 Automatic Build System 1.2-1mamba +- automatic version update by autodist + +* Wed Feb 27 2013 Automatic Build System 1.1.3-1mamba +- automatic version update by autodist + +* Tue Feb 12 2013 Automatic Build System 1.1.2-1mamba +- automatic version update by autodist + +* Fri Dec 07 2012 Automatic Build System 1.0.1-1mamba +- automatic version update by autodist + +* Fri Sep 28 2012 Automatic Build System 1.0-1mamba +- automatic version update by autodist + +* Wed Sep 19 2012 Automatic Build System 0.11.2-1mamba +- automatic version update by autodist + +* Fri Jun 08 2012 Automatic Build System 0.11.1-1mamba +- automatic version update by autodist + +* Sun May 06 2012 Automatic Build System 0.10.3-1mamba +- automatic version update by autodist + +* Mon Apr 02 2012 Automatic Build System 0.10.2-1mamba +- automatic version update by autodist + +* Sun Apr 01 2012 Silvan Calarco 0.10.1-1mamba +- update to 0.10.1 + +* Wed Mar 28 2012 Ercole 'ercolinux' Carpanetto 0.08.10-2mamba +- added --enable-x11grab option + +* Fri Mar 16 2012 Silvan Calarco 0.8.10-1mamba +- update to 0.8.10 +- added libavformat/url.h as required by recent chromium + +* Tue Nov 22 2011 Automatic Build System 0.8.7-1mamba +- automatic version update by autodist + +* Sat Nov 05 2011 Automatic Build System 0.8.6-1mamba +- automatic version update by autodist + +* Tue Oct 25 2011 Silvan Calarco 0.8.5-2mamba +- obsolete libav* + +* Tue Oct 25 2011 Silvan Calarco 0.8.5-1mamba +- update to 0.8.5 + +* Mon Oct 18 2010 Automatic Build System 0.6.1-1mamba +- automatic update to 0.6.1 by autodist + +* Tue Jun 22 2010 Automatic Build System 0.6-1mamba +- automatic update to 0.6 by autodist + +* Tue May 25 2010 Automatic Build System 0.5.2-1mamba +- automatic update to 0.5.2 by autodist + +* Tue Mar 16 2010 Automatic Build System 0.5.1-2mamba +- automatic rebuild by autodist + +* Fri Mar 05 2010 Automatic Build System 0.5.1-1mamba +- automatic update to 0.5.1 by autodist + +* Thu Nov 19 2009 Automatic Build System 0.5.0.20091119-1mamba +- update to 0.5.snapshot20091119 + +* Wed Aug 12 2009 Automatic Build System 0.5-3mamba +- automatic rebuild by autodist + +* Fri Jul 10 2009 Automatic Build System 0.5-2mamba +- automatic rebuild by autodist + +* Mon Apr 06 2009 Silvan Calarco 0.5-1mamba +- update to 0.5 +- removed compatibility headers as complained by libxine 1.1.16.3 + +* Mon Dec 01 2008 Silvan Calarco 20081113-5mamba +- remove provides for libffmpeg and libffmpeg-devel + +* Thu Nov 20 2008 gil 20081113-4mamba +- rebuilt with new libdc1394 2.0.2 + +* Thu Nov 20 2008 Silvan Calarco 20081113-3mamba +- add obsoletes for libffmpeg and libffmpeg to all subpackages + +* Wed Nov 19 2008 Silvan Calarco 20081113-2mamba +- ffmpeg: don't obsolete libpostproc + +* Fri Nov 14 2008 Silvan Calarco 20081113-1mamba +- package renamed to ffmpeg; rename libraries to standard names and add proper provides and obsoletes for upgrade + +* Wed Aug 20 2008 gil 20080820-1mamba +- update to 20080820 +- edit configure options +- added patch +- rebuilt with: libschroedinger, libamrnb, libamrwb, ffmpeg-checkout-snapshot.tar.bz2, +- enable non free (libamrnb, libamrwb) License: unredistributable + +* Mon Jun 02 2008 Silvan Calarco 20080504-2mamba +- rebuilt with recent libdc1394 + +* Mon May 05 2008 Silvan Calarco 20080504-1mamba +- update to 20080505 + +* Wed Apr 02 2008 Silvan Calarco 20080402-1mamba +- update to 20080402 + +* Fri Feb 29 2008 Silvan Calarco 20080229-1mamba +- update to 20080229 +- set exported-snapshot as source instead of svn + +* Sun Feb 03 2008 Silvan Calarco 20080203-1mamba +- update to 20080203 + +* Thu Dec 13 2007 Silvan Calarco 20071213-1mamba +- update to 20071213 +- enabled pthread support +- changed package maintainer +- enabled support for libtheora and libx264 + +* Fri Jan 19 2007 Davide Madrisan 20070119-1qilnx +- updated to subversion 20070119 +- dropped patch against CVE-2005-4048 (merged upstream) +- the shared libraries are now compiled with the -fPIC option: dropped patch + +* Mon Dec 19 2005 Davide Madrisan 0.4.9-2qilnx +- fixed security issue CVE-2005-4048 (qibug#97) +- gcc4 fixes; compile the library with -fPIC +- HTML documentation moved to devel package + +* Fri Jun 17 2005 Davide Madrisan 0.4.9-pre1-1qilnx +- update to version 0.4.9-pre1 by autospec + +* Sun Oct 03 2004 Davide Madrisan 0.4.8-2qilnx +- specfile modified to match QiLinux standards +- library name modified (was ffmpeg) +- added a path to fix the broken configure check for the imlib2 library + +* Mon Sep 13 2004 Matteo Bernasconi 0.4.8-1qilnx +- first build