Package Details: ffmpeg-cuda-full 2:8.1.1-3

Git Clone URL: https://aur.archlinux.org/ffmpeg-cuda-full.git (read-only, click to copy)
Package Base: ffmpeg-cuda-full
Description: Latest FFmpeg with CUDA/NVENC and all codecs including nonfree (libfdk-aac) - dynamically tracks upstream releases
Upstream URL: https://ffmpeg.org/
Licenses: custom:nonfree, GPL-3.0-only
Conflicts: ffmpeg
Provides: ffmpeg, libavcodec.so, libavdevice.so, libavfilter.so, libavformat.so, libavutil.so, libswresample.so, libswscale.so
Replaces: ffmpeg
Submitter: slyfox1186
Maintainer: slyfox1186
Last Packager: slyfox1186
Votes: 1
Popularity: 0.117986
First Submitted: 2026-04-02 03:14 (UTC)
Last Updated: 2026-06-21 16:24 (UTC)

Required by (2528)

Sources (2)

Latest Comments

slyfox1186 commented on 2026-06-21 16:30 (UTC)

@kcocoa — thanks for the report and the precise diagnosis; you nailed the cause exactly.

Root cause: build() rewrote the march flag with an unanchored substring substitution, ${CFLAGS/-march=x86-64/-march=native}. That matches the -march=x86-64 prefix of a microarchitecture level like -march=x86-64-v3 and leaves the -v3 dangling, producing the bogus -march=native-v3cc1: error: bad value 'native-v3'. Anyone building with an x86-64-v2/v3/v4 baseline in makepkg.conf tripped over it.

Fixed in 2:8.1.1-3 (just pushed): the substitution now replaces the entire -march=/-mtune= token (sed -E 's/-march=[^[:space:]]+/-march=native/') instead of a fragment, so it can no longer produce a malformed value regardless of the arch you've configured. Please pull the update and let me know if it builds cleanly for you.

On the broader point — it's a deliberate design choice, not an arbitrary one. -cuda-full is meant to be a maximally-optimized local build; "-O3 -march=native for your CPU" is one of its advertised features, so it intentionally forces -march=native over whatever arch is configured. If you want a generic/portable or distro-baseline build, stock extra/ffmpeg (or rebuilding it) is the better fit. That said, your -O0 example is respected now: only the default -O2 is bumped to -O3, so an explicit -O0/-Os/etc. is left untouched and you can still do an unoptimized debug build.

One caveat to flag before you post: the reply states -O0 is honored — that's accurate to the shipped fix (only -O2 is rewritten). If you'd prefer to also force -O3 unconditionally, tell me and I'll adjust both the PKGBUILD and this wording to match.

kcocoa commented on 2026-06-09 05:37 (UTC) (edited on 2026-06-09 05:38 (UTC) by kcocoa)

My compilation configuration in makepkg.conf:

CFLAGS="-march=x86_64-v3 \
    ...

Then your PKGBUILD incorrectly replaced the -march option:

CFLAGS="${CFLAGS/-march=x86-64/-march=native}"

This resulted in the non-existent option native-v3 and build failure.

cc1: error: bad value 'native-v3' for '-march=' switch

One solution is to match the prefix.

However, I don't quite understand why you would arbitrarily optimize the compilation flags for the user. What if someone just wants to try -march=x86_64 -O0?

slyfox1186 commented on 2026-05-17 20:26 (UTC)

@jfk9w — thanks for the report and the diagnostic detail (the nvcc --help test was very helpful for narrowing this down).

Root cause: FFmpeg's configure sets the default --nvccflags to -gencode arch=compute_30,code=sm_30 -O2 (Kepler) and only falls back to compute_60 / compute_75 if nvcc's stderr contains the literal English word "unsupported". Current Arch ships CUDA 13.2, which dropped everything below sm_75 — so the fallback usually fires, but it's fragile: a non-English locale, an nvcc wrapper, or any future CUDA toolkit that rewords the error will break the probe, and configure then dies trying to compile the test kernel with an unbuildable arch. The script that does this probe is identical between n8.1 and n8.1.1, which is why a CUDA upgrade on your end between the two builds is the most likely trigger.

Fix in 2:8.1.1-2 (just pushed): query nvcc --list-gpu-arch for the lowest arch the installed toolkit actually supports and pass --nvccflags="-gencode arch=<arch>,code=<sm> -O2" to configure explicitly, bypassing the probe entirely. Falls back to compute_75 if the query fails. Please pull the update and let me know if it builds cleanly for you.

jfk9w commented on 2026-05-09 20:47 (UTC)

Thanks for the package!

I'm unable to build the latest version.

The error message says: "ERROR: failed checking for nvcc.". nvcc is present and located in /opt/cuda/bin. It also successfully prints help if I add "nvcc --help" directly below "export PATH=/opt/cuda/bin:$PATH" in PKGBUILD.

Previous version (2:8.1-1) was built without any issues and works fine. Help?

slyfox1186 commented on 2026-04-30 18:41 (UTC)

Thanks for the suggestion and for the well-formatted diff. It made this trivial to apply. Merged in 2:8.1-2, sourced exactly as you proposed with git apply -3 so it'll fall back to a 3-way merge if upstream FFmpeg shifts the surrounding code in a future release. b2sum verified against Arch's current pkgrel=3, so we're tracking their patch directly.

Good catch on the qt6-webengine breakage as this is exactly the kind of compatibility gap a replaces=ffmpeg package shouldn't introduce. Glad the package is useful to you!

galuise commented on 2026-04-17 04:38 (UTC)

Would you consider including the 0001-Add-av_stream_get_first_dts-for-Chromium.patch from the official arch package?

And the following change to PKGBUILD to incorporate it?:

diff --git a/PKGBUILD b/PKGBUILD
index d304bcc..1fb3f7e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -121,8 +121,8 @@ conflicts=('ffmpeg')
 replaces=('ffmpeg')
 install=ffmpeg-cuda-full.install
 options=('!lto')
-source=("ffmpeg::git+https://git.ffmpeg.org/ffmpeg.git")
-b2sums=('SKIP')
+source=("ffmpeg::git+https://git.ffmpeg.org/ffmpeg.git" "0001-Add-av_stream_get_first_dts-for-Chromium.patch")
+b2sums=('SKIP' 'e5f7b79f7731be9ee5a7280a9221fb531ac5a2d9820fc5870b68b0eabea667dfbe8f39f41c1e1763a4c84982896afaa54c81ff57847d203b70afafd726689e5d')

 # Dynamically resolve the latest stable release tag from upstream.
 # This runs at build time so the package always tracks the newest FFmpeg.
@@ -149,6 +149,9 @@ prepare() {
     cd ffmpeg
     # Checkout the exact release tag determined by pkgver()
     git checkout "n${pkgver}" 2>/dev/null || true
+
+    # https://crbug.com/1251779
+    git apply -3 ../0001-Add-av_stream_get_first_dts-for-Chromium.patch
 }

 build() {

Without this patch things like qt6-webengine break as Chromium still relies on that dts call.

Thank you for this package!