As a note, if you want debug symbols, you have to set FFMPEG_OBS_DEBUG
AND
add this to the PKGBUILD
options=('!strip')
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: | 24 |
Popularity: | 1.03 |
First Submitted: | 2021-12-16 11:56 (UTC) |
Last Updated: | 2025-07-17 11:22 (UTC) |
As a note, if you want debug symbols, you have to set FFMPEG_OBS_DEBUG
AND
add this to the PKGBUILD
options=('!strip')
@tytan652 ffmpeg is moving their upstream git repo to forgejo hosted at https://code.ffmpeg.org/ffmpeg/ffmpeg. You can read about the announcement here, they want people to start using it "effective [immediately]".
need to be rebuilt
for some reason rockchip-mpp is causing a very minor issue in my fish install.
whenever I type mpv .
for the first time (not pressing enter) in a terminal session it will print out the following error:
mpp[588415]: kmpp_obj: kmpp_objdef_get invalid param def 0x7908daa81f10 name 0x7908da9f74c4 objs (nil)
mpp[588415]: kmpp_frame: kmpp_frame_init KMPP_OBJ_NAME init failed
Would it be possible to add a toggle to disable whatever feature in ffmpeg requires it if it isn't necessary?
For those building with:
FFMPEG_OBS_CUDA="ON"
FFMPEG_OBS_SVT="ON"
FFMPEG_OBS_VULKAN="ON"
I believe the issue is related to the --enable-cuda-nvcc
flag as that was what breaks my builds in a clean chroot...
Here's my patch to get a successful build (I'll try to keep this comment updated with each commit until it builds successfully on its own):
diff --git a/050-nvccflags-cpp14.patch b/050-nvccflags-cpp14.patch
deleted file mode 100644
index b362b31..0000000
--- a/050-nvccflags-cpp14.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/configure b/configure2
-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"
diff --git a/PKGBUILD b/PKGBUILD
index 9be3c08..689cec3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -357,14 +357,12 @@ 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)
@@ -465,10 +463,6 @@ 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() {
For people getting an "incompatible pointer type" error when building libavdevice/v4l2.c in version 7.1.1, you may want to apply the patch in this bug ticket until they fix it upstream. https://trac.ffmpeg.org/ticket/11570
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:
EDIT: 2025-05-25: Added another comment above with a patch to the current PKGBUILD file (also creates another .patch file to update ffmpeg's stock configure
script to reference c++14 (instead of c++11)...
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.
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!
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)
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.