Package Details: ffmpeg-obs 7.1.1-2

Git Clone URL: https://aur.archlinux.org/ffmpeg-obs.git (read-only, click to copy)
Package Base: ffmpeg-obs
Description: Complete solution to record, convert and stream audio and video with fixes for OBS Studio. And various options in the PKGBUILD
Upstream URL: https://ffmpeg.org/
Keywords: audio codec convert encoder ffmpeg media obs vaapi video
Licenses: GPL-3.0-only
Conflicts: ffmpeg
Provides: ffmpeg, libavcodec.so, libavdevice.so, libavfilter.so, libavformat.so, libavutil.so, libpostproc.so, libswresample.so, libswscale.so
Submitter: tytan652
Maintainer: tytan652
Last Packager: tytan652
Votes: 22
Popularity: 1.21
First Submitted: 2021-12-16 11:56 (UTC)
Last Updated: 2025-05-11 05:55 (UTC)

Dependencies (88)

Required by (1965)

Sources (3)

Pinned Comments

tytan652 commented on 2022-07-23 05:48 (UTC) (edited on 2024-06-21 13:15 (UTC) by tytan652)

Please, this package follow Arch Linux ffmpeg package version (not the staging or the testing one).

Don't put ffmpeg-obs out-of-date if both packages are on the same version. If you do, you might be ignored in the future.

tytan652 commented on 2021-12-17 15:32 (UTC)

OBS Project actually patch FFmpeg to fix some issues and also add RIST support starting from 27.2.

So I created this package, a ffmpeg package that ensure that you have those.

I really wanted to not do this but some fixes are needed, so I did my best to add those "feature-set options".

They allow you to build ffmpeg with feature-set based on other ffmpeg packages from AUR.

Read the PKGBUILD for more information about them.

Latest Comments

1 2 3 4 5 6 .. 14 Next › Last »

galuise commented on 2025-05-12 01:49 (UTC) (edited on 2025-05-12 15:16 (UTC) by galuise)

The newest commit still fails to build with FFMPEG_OBS_CUDA="ON" with the same error described in my previous comment.

I did take the time to perform a clean chroot build just to confirm there was nothing strange about my specific environment. I did have a few older versions of gcc installed (including gcc-11 which I have removed). The clean chroot build only had gcc-15 and gcc-14 (as gcc-14 is required for CUDA - the latest version is built against gcc-14).

If anyone else runs FFMPEG_OBS_CUDA="ON" here are the patches I did to get a successful build:

My Patch to PKGBUILD:

diff --git a/PKGBUILD b/PKGBUILD
index 95003dd..8371a60 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -357,12 +357,14 @@ if [[ $FFMPEG_OBS_SVT == 'ON' ]]; then
     "030-ffmpeg-add-svt-hevc-docs-g${_svt_hevc_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/${_svt_hevc_ver}/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch"
     "031-ffmpeg-add-svt-vp9.patch"
     "040-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/${_svt_vp9_ver}/ffmpeg_plugin/master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch"
+    "050-nvccflags-cpp14.patch"
   )
   sha256sums+=(
     '9047e18d34716812d4ea7eafc1d0fd8b376d922a4b6b4dc20237662fcaf0c996'
     'a164ebdc4d281352bf7ad1b179aae4aeb33f1191c444bed96cb8ab333c046f81'
     'aa0daffc4d234b6621b63c298dc165d29522c5087f8905a923d23ee2d164e9ad'
     '59da61f2b2c556fbe0cdbf84bcc00977ee3d2447085decb21f6298226559f2aa'
+    'aa471410078cad635f4bc417b77de967faab4b3ca8e7578d22d9ed6edbc94543'
   )
   _args+=(--enable-libsvthevc --enable-libsvtvp9)
   provides+=(ffmpeg-svt-hevc ffmpeg-svt-vp9)
@@ -457,6 +459,10 @@ prepare() {
     patch -Np1 -i "${srcdir}/031-ffmpeg-add-svt-vp9.patch"
     patch -Np1 -i <(filterdiff -i b/libavcodec/libsvt_vp9.c "${srcdir}/040-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch")
   fi
+
+  if [[ $FFMPEG_OBS_CUDA == 'ON' ]]; then
+    patch -Np1 -i "${srcdir}/050-nvccflags-cpp14.patch"
+  fi
 }

 build() {

050-nvccflags-cpp14.patch:

diff --git a/configure b/configure
index 7ea54fc7c0..d44e0c53b2 100755
--- a/configure
+++ b/configure2
@@ -6748,7 +6748,7 @@ if [ -z "$nvccflags" ]; then
     nvccflags=$nvccflags_default
 fi

-nvccflags="$nvccflags -std=c++11"
+nvccflags="$nvccflags -std=c++14"

 if enabled x86_64 || enabled ppc64 || enabled aarch64; then
     nvccflags="$nvccflags -m64"

galuise commented on 2025-05-10 21:56 (UTC) (edited on 2025-05-10 22:26 (UTC) by galuise)

Hi @tytan652,

After a recent pacman -Syu (today actually - 5/10/2025) I couldn't get this to build. ffmpeg's ./configure process was relying on c++11 for the nvccflags...

Seeing as my installed cuda package was built against gcc14 I was able to get the package to build with the following patches:

nvccflags_cpp14.patch:

diff --git a/configure b/configure
index ffa407d53d..f3e223cfac 100755
--- a/configure
+++ b/configure
@@ -6742,7 +6742,7 @@ if [ -z "$nvccflags" ]; then
     nvccflags=$nvccflags_default
 fi

-nvccflags="$nvccflags -std=c++11"
+nvccflags="$nvccflags -std=c++14"

 if enabled x86_64 || enabled ppc64 || enabled aarch64; then
     nvccflags="$nvccflags -m64"

my changes to PKGBUILD to include the above patch:

diff --git a/PKGBUILD b/PKGBUILD
index e042159..770d348 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -417,6 +417,9 @@ if [[ $_nonfree_enabled == 'ON' ]]; then
   _args+=(--enable-nonfree)
 fi

+source+=("nvccflags_cpp14.patch")
+sha256sums+=("SKIP")
+
 prepare() {
   cd ffmpeg

@@ -457,6 +460,7 @@ prepare() {
     patch -Np1 -i "${srcdir}/031-ffmpeg-add-svt-vp9.patch"
     patch -Np1 -i <(filterdiff -i b/libavcodec/libsvt_vp9.c "${srcdir}/040-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch")
   fi
+  patch -Np1 -i "${srcdir}/nvccflags_cpp14.patch"
 }

 build() {

Previously, it would fail with the following error:

==> Starting build()...
ERROR: failed checking for nvcc.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
==> ERROR: A failure occurred in build().
    Aborting...

Digging into why:

$ tail -12 src/ffmpeg/ffbuild/config.log 
nvcc -gencode arch=compute_60,code=sm_60 -O2 -std=c++11 -m64 -ptx -c -o /tmp/ffconf.aMyvBBtd/test.o /tmp/ffconf.aMyvBBtd/test.cu
nvcc warning : Support for offline compilation for architectures prior to '<compute/sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/include/c++/type_traits(1610): error: "__is_nothrow_new_constructible" is not a function or static data member
      constexpr bool __is_nothrow_new_constructible
                     ^

/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/include/c++/type_traits(1610): error: "constexpr" is not valid here
      constexpr bool __is_nothrow_new_constructible
      ^

2 errors detected in the compilation of "/tmp/ffconf.aMyvBBtd/test.cu".
ERROR: failed checking for nvcc.

Hope that helps.

dreieck commented on 2025-03-27 15:57 (UTC)

If you have glibc in the depends array (which is part of the core group and thus not needed), then you also can add gcc-libs:

ffmpeg-obs W: Dependency gcc-libs detected and implicitly satisfied (libraries ['usr/lib/libstdc++.so.6', 'usr/lib/libgcc_s.so.1'] needed in files ['usr/lib/libavdevice.so.61.3.100'])

Regards and thanks for this package!

DodoGTA commented on 2025-02-08 15:15 (UTC)

Can you add a fix patch to this custom FFmpeg package?: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13662

Upstream seems to be relatively slow (at least at the moment)

MarsuvesVex commented on 2025-01-22 04:29 (UTC)

I had the same issue as mentioned here:

"with the latest version (7.1-5) I get the following build error: libavdevice/v4l2.c: In function ‘device_open’: libavdevice/v4l2.c:141:17: error: assignment to ‘int (*)(int, long unsigned int, ...)’ from incompatible pointer type ‘int (*)(int, int, ...)’ [-Wincompatible-pointer-types] 141 | s->ioctl_f = prefix ## ioctl; does anybody know how to solve this?"

I had some issues creating a patch file (but that's on me) so I manually changed the offending file

steps to manually fix

yay -G ffmpeg-obs
cd ffmpeg-obs
sed -i 's/s->ioctl_f = prefix ## ioctl;/s->ioctl_f = (int (*)(int, unsigned long, ...))prefix ## ioctl;/' libavdevice/v4l2.c

Or manually changing line 141 such as:

--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -138,7 +138,7 @@
     s->dup_f    = prefix ## dup;                  \
     s->ioctl_f  = prefix ## ioctl;               \
     s->read_f   = prefix ## read;                \
-    s->munmap_f = prefix ## munmap;              \
+    s->ioctl_f  = (int (*)(int, unsigned long, ...))prefix ## ioctl; \
     s->munmap_f = prefix ## munmap;              \
 } while (0)

luma commented on 2025-01-19 08:29 (UTC) (edited on 2025-01-19 09:12 (UTC) by luma)

with the latest version (7.1-5) I get the following build error:

libavdevice/v4l2.c: In function ‘device_open’:
libavdevice/v4l2.c:141:17: error: assignment to ‘int (*)(int,  long unsigned int, ...)’ from incompatible pointer type ‘int (*)(int,  int, ...)’ [-Wincompatible-pointer-types]
  141 |     s->ioctl_f  = prefix ## ioctl;

does anybody know how to solve this?

Bink commented on 2025-01-06 22:20 (UTC) (edited on 2025-01-06 22:24 (UTC) by Bink)

@BuyMyMojo, it's already possible with this package. @tytan652 has provided options within this package to enable/disable build options. Refer to the PKGBUILD file for full details.

To access the options, edit your /etc/makepkg.conf and include any options you want to enable at the end of the file. You wouldn't need to include ALL of these, be selective, as you would have overlap if FFMPEG_OBS_FULL is on (enables DECKLINK, LIBFDK_AAC, SVT and VULKAN).

## Enable everything except CUDA changes (enable it manually if you want it)
FFMPEG_OBS_FULL=ON

## If 'ON', CUDA compilation is made with Nvidia CUDA Compiler, this is what ffmpeg-cuda provides. (nonfree option)
FFMPEG_OBS_CUDA=ON

## Enable debugging symbols
FFMPEG_OBS_DEBUG=ON

## Add changes from ffmpeg-decklink (nonfree option)
FFMPEG_OBS_DECKLINK=ON

## Add changes from ffmpeg-libfdk_aac (nonfree option)
FFMPEG_OBS_LIBFDK_AAC=ON

## Add SVT related changes from ffmpeg-full because ffmpeg-svt is out of date
FFMPEG_OBS_SVT=ON

## Add changes from ffmpeg-vulkan (now only enables libglslang since vulkan is enabled upstream)
FFMPEG_OBS_VULKAN=ON

BuyMyMojo commented on 2024-12-11 12:56 (UTC)

Would it be possible to have a modified version of ffmpeg-full or ffmpeg-full-git with these patches too?

Beethoven-n commented on 2024-12-01 06:39 (UTC)

Installing normal ffmpeg fixed an issue detailed here that applies to telegram-desktop and mpv. I'm not sure why this happened, or how to look into it, but obs-studio-browser is kind of busted until the issue resolves. https://aur.archlinux.org/packages/mpv-git#comment-1000572

nrv commented on 2024-11-08 21:55 (UTC)

When updating to 7.1-1, one of the SVT patch files failed validation.

==> Validating source files with sha256sums...
    ffmpeg ... Skipped
    obs-deps ... Skipped
    add-av_stream_get_first_dts-for-chromium.patch ... Passed
    020-ffmpeg-add-svt-hevc-ged80959.patch ... Passed
    030-ffmpeg-add-svt-hevc-docs-ged80959.patch ... Passed
    040-ffmpeg-add-svt-vp9-g1feb760.patch ... FAILED
    license_if_nonfree_enabled.txt ... Passed
==> ERROR: One or more files did not pass the validity check!
error: failed to download sources for 'ffmpeg-obs-7.1-1': 

The PKGBUILD has ee9499836808b6f5e583dcc1b21c28598550c58386c53cfaef41d25121ea2022 as the SHA-256 hash, but the actual file hashes to e801727b9cfb843db4efc34d3de8cf03ddf5687ff02429ac6c051e1d78d8923e.