AV1 computational performance and quality has improved greatly over the least
few years and I find that it has become a viable free alternative to the
encumbered H.264 for my use cases. This patch adds support for graphics/ffmpeg
for svt-av1, which we already have in ports as multimedia/svt-av1.
Tested on amd64 with current svt-av1 and Brad Smith's 3.1.2 patch sent to
ports@ last week, but would appreciate testing on other platforms. You can for
example use:
ffmpeg -f lavfi -t 17 -i testsrc=size=1920x1080 -c:v libsvtav1
/tmp/svtav1test.webm
commit ba69fd580240368640506a9a45ddebf89a4b456d
from: Pontus Stenetorp <[email protected]>
date: Sat Jan 17 14:37:46 2026 UTC
graphics/ffmpeg: Add svt-av1 support
Tested on amd64 with current svt-av1 and Brad Smith's 3.1.2 patch.
commit - 0ed29bf3df2017459c814f2eef19265a4a7441fe
commit + ba69fd580240368640506a9a45ddebf89a4b456d
blob - 49f9b0b67c61e4daae76784f0c9edff76f38ebdf
blob + 53ad5e56278eb05533244d8f293225238b479ad0
--- graphics/ffmpeg/Makefile
+++ graphics/ffmpeg/Makefile
@@ -2,6 +2,7 @@ COMMENT= audio/video converter and streamer
# keep it synced with x11/mplayer
V= 8.0.1
+REVISION= 1
DISTNAME= ffmpeg-${V}
CATEGORIES= graphics multimedia
SITES= https://ffmpeg.org/releases/
@@ -101,6 +102,15 @@ LIBavutil_EXTRALIBS=-L${X11BASE}/lib -lva -lva-drm -lv
LIBswresample_EXTRALIBS=-lm
LIBswscale_EXTRALIBS=-lm
+.include <bsd.port.arch.mk>
+
+.if ${PROPERTIES:Mlp64} || ${MACHINE_ARCH} == i386
+WANTLIB+= SvtAv1Enc
+LIB_DEPENDS+= multimedia/svt-av1
+LIBavcodec_EXTRALIBS+= -lSvtAv1Enc
+CONFIGURE_ARGS+= --enable-libsvtav1
+.endif
+
.if ${MACHINE_ARCH} == i386
LDLIBFLAGS+= -Wl,-znotext
.endif