From: Pontus Stenetorp Subject: Re: graphics/ffmpeg: Add svt-av1 support To: Brad Smith Cc: ports@openbsd.org Date: Sun, 25 Jan 2026 00:44:17 +0900 On Fri 23 Jan 2026, Brad Smith wrote: > On 2026-01-22 9:21 a.m., Jeremie Courreges-Anglas wrote: > > On Mon, Jan 19, 2026 at 01:43:18PM +0100, Jeremie Courreges-Anglas wrote: > > > On Mon, Jan 19, 2026 at 01:36:46PM +0100, Kirill A. Korinsky wrote: > > > > On Mon, 19 Jan 2026 13:18:08 +0100, > > > > Jeremie Courreges-Anglas wrote: > > > > > On Mon, Jan 19, 2026 at 12:53:36PM +0100, Kirill A. Korinsky wrote: > > > > > > On Mon, 19 Jan 2026 12:12:58 +0100, > > > > > > Stuart Henderson wrote: > > > > > > > On 2026/01/19 17:33, Pontus Stenetorp wrote: > > > > > > > > > > > > > > > > # keep it synced with x11/mplayer > > > > > > > > V= 8.0.1 > > > > > > > > +REVISION= 1 > > > > > > > > > > > > > > please use tabs not spaces and REVISION should start at 0 > > > > > > > > > > > > > > > +.include > > > > > > > > + > > > > > > > > +.if ${PROPERTIES:Mlp64} || ${MACHINE_ARCH} == i386 > > > > > > > > > > > > > > why the arch restriction? > > > > > > > > > > > > Probably because multimedia/svt-av1 has: > > > > > > > > > > > > ONLY_FOR_ARCHS= ${LP64_ARCHS} i386 > > > > > > > > > > That sucks because it means wantlib vs deps breakage on non-lp64 > > > > > non-i386 archs. > > > > > > > > I had fast look to https://gitlab.com/AOMediaCodec/SVT-AV1/-/tree/master/Source/Lib > > > > and I don't see anything that should technically prevent it from at least > > > > build on non LP64 architectures. > > > > > > > > Also, it seems that it was imported with ONLY_FOR_ARCHS=${LP64_ARCHS} > > > > > > > > Maybe try to remove it and see how it goes? > > > > > > That, and/or ask Brad (cc) why ONLY_FOR_ARCHS was added in the first > > > place. > > > > svt-av1 doesn't *seem* to have any hard arch restriction, except: > > - message(WARNING "32-bit is not supported") > > - only amd64 and arm64 has assembly code > > > > so is there another reason why svt-av1 is disabled on all 32 bits > > archs but i386? > > > > The only other 32 bits archs which gets bulk builds is arm and isn't > > really suitable for multimedia, but still, it would be saner to clarify > > the situation here. > > Originally it was set to only build on 64-bit archs as it did not even build > on > 32-bit archs, but that was fixed. Which is when I added i386 to play around > with. > > I was under the impression the memory requirements made it unusable all > together > on 32-bit systems. It's the reason I haven't enabled support in FFmpeg to > date. > > Testing now on i386 with some 4K and 1080P content to see what things are > like. > > 4K is unusable to be encoded on a 32-bit system. But it's the same for all > of the > encoders so this is not unique to SVT-AV1. With 1080P content it does not > seem > to be any worse than the rest. > > I have removed the ONLY_FOR_ARCHS marker. Cheers Brad! Thank you for clarifying and the ONLY_FOR_ARCHS removal and 3.1.2 multimedia/svt-av1 diffs are now in. Please find my updated diff for enabling svt-av1 for graphics/ffmpeg below. Tested again on amd64 with: ffmpeg -f lavfi -t 17 -i testsrc=size=1920x1080 -c:v libsvtav1 /tmp/svtav1test.webm diff /usr/ports path + /usr/ports commit - 9f053aa3d479aeac7429f2130d8107a87f8e1bf7 blob - 49f9b0b67c61e4daae76784f0c9edff76f38ebdf file + graphics/ffmpeg/Makefile --- 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= 0 DISTNAME= ffmpeg-${V} CATEGORIES= graphics multimedia SITES= https://ffmpeg.org/releases/ @@ -38,7 +39,7 @@ MAINTAINER= Brad Smith \ # LGPLv2.1 and GPLv2 PERMIT_PACKAGE= Yes -WANTLIB += SDL2 X11 Xext Xv aom ass bz2 c crypto dav1d fontconfig +WANTLIB += SDL2 SvtAv1Enc X11 Xext Xv aom ass bz2 c crypto dav1d fontconfig WANTLIB += freetype fribidi gsm harfbuzz iconv lzma m mp3lame opus WANTLIB += pthread sndio speex ssl theoradec theoraenc v4l2 va WANTLIB += va-drm va-x11 vidstab vorbis vorbisenc vpx webp webpmux @@ -76,16 +77,18 @@ LIB_DEPENDS= archivers/bzip2 \ multimedia/libv4l \ multimedia/libvidstab \ multimedia/libvpx \ + multimedia/svt-av1 \ multimedia/x264 \ multimedia/x265 \ multimedia/xvidcore \ textproc/libxml # inter-library dependencies for the current configuration -LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -L${X11BASE}/lib -laom -ldav1d -lgsm -liconv -llzma -LIBavcodec_EXTRALIBS+=-lmp3lame -lopus -lspeex -ltheoradec -ltheoraenc -lvorbis -LIBavcodec_EXTRALIBS+=-lvorbisenc -lvpx -lwebp -lwebpmux -lx264 -lx265 -lxvidcore -LIBavcodec_EXTRALIBS+=-lm -lz -lva -lva-drm -pthread +LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -L${X11BASE}/lib -lSvtAv1Enc -laom +LIBavcodec_EXTRALIBS+=-ldav1d -lgsm -liconv -llzma -lmp3lame -lopus -lspeex +LIBavcodec_EXTRALIBS+=-ltheoradec -ltheoraenc -lvorbis -lvorbisenc -lvpx -lwebp +LIBavcodec_EXTRALIBS+=-lwebpmux -lx264 -lx265 -lxvidcore -lm -lz -lva -lva-drm +LIBavcodec_EXTRALIBS+=-pthread LIBavdevice_EXTRALIBS=-L${LOCALBASE}/lib -L${X11BASE}/lib -lX11 -lXext -lXv LIBavdevice_EXTRALIBS+=-lxcb-shape -lxcb-shm -lxcb-xfixes -lxcb -lsndio -lv4l2 -lm @@ -137,6 +140,7 @@ CONFIGURE_ARGS+=--enable-shared \ --enable-libmp3lame \ --enable-libopus \ --enable-libspeex \ + --enable-libsvtav1 \ --enable-libtheora \ --enable-libv4l2 \ --enable-libvorbis \