Index | Thread | Search

From:
Rafael Sadowski <rafael@sizeofvoid.org>
Subject:
Re: Request to include webp support in ffmpeg
To:
Igor Zornik <mocheryl@mocheryl.org>
Cc:
OpenBSD ports <ports@openbsd.org>, Brad Smith <brad@comstyle.com>
Date:
Tue, 18 Mar 2025 08:37:06 +0100

Download raw body.

Thread
On Mon Mar 17, 2025 at 09:43:48PM +0100, Igor Zornik wrote:
> Hello ports!
> 
> Is there a good chance of getting webp support in the official ffmpeg
> port? Some software (outside of ports) requires it. For such cases I
> run a custom build, but already having webp in the default installation
> would of course be preferable. Something like the below diff should
> suffice.
> 
> With kind regards

Yes please, ok Brad?

> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/ffmpeg/Makefile,v
> retrieving revision 1.243
> diff -u -p -u -p -r1.243 Makefile
> --- Makefile	28 Jan 2025 11:22:02 -0000	1.243
> +++ Makefile	17 Mar 2025 20:35:50 -0000
> @@ -1,7 +1,7 @@
>  COMMENT=	audio/video converter and streamer
>  
>  V=		6.1.2
> -REVISION=	0
> +REVISION=	1
>  DISTNAME=	ffmpeg-${V}
>  EPOCH=		1
>  CATEGORIES=	graphics multimedia
> @@ -29,8 +29,8 @@ PERMIT_PACKAGE=	Yes
>  WANTLIB += SDL2 X11 Xext Xv aom ass bz2 c crypto dav1d fontconfig
>  WANTLIB += freetype fribidi gsm iconv lzma m mp3lame opus pthread
>  WANTLIB += sndio speex ssl theoradec theoraenc v4l2 va va-drm
> -WANTLIB += va-x11 vidstab vorbis vorbisenc vpx x264 x265 xcb xcb-shape
> -WANTLIB += xcb-shm xcb-xfixes xml2 xvidcore z zimg
> +WANTLIB += va-x11 vidstab vorbis vorbisenc vpx webp x264 x265 xcb
> +WANTLIB += xcb-shape xcb-shm xcb-xfixes xml2 xvidcore z zimg
>  
>  COMPILER=	base-clang ports-gcc
>  COMPILER_LANGS=	c
> @@ -52,6 +52,7 @@ LIB_DEPENDS=	archivers/bzip2 \
>  		audio/gsm \
>  		converters/libiconv \
>  		devel/sdl2 \
> +		graphics/libwebp \
>  		graphics/zimg \
>  		multimedia/aom \
>  		multimedia/dav1d \
> @@ -68,8 +69,8 @@ LIB_DEPENDS=	archivers/bzip2 \
>  # 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 -lx264 -lx265 -lxvidcore -lm -lz -lva
> -LIBavcodec_EXTRALIBS+=-lva-drm -pthread
> +LIBavcodec_EXTRALIBS+=-lvorbisenc -lvpx -lwebp -lwebpdecoder -lwebpdemux -lwebpmux
> +LIBavcodec_EXTRALIBS+=-lx264 -lx265 -lxvidcore -lm -lz -lva -lva-drm -pthread
>  
>  LIBavdevice_EXTRALIBS=-L${LOCALBASE}/lib -L${X11BASE}/lib -lX11 -lXext -lXv
>  LIBavdevice_EXTRALIBS+=-lxcb-shape -lxcb-shm -lxcb-xfixes -lxcb -lsndio -lv4l2 -lm
> @@ -125,6 +126,7 @@ CONFIGURE_ARGS+=--enable-shared \
>  		--enable-libv4l2 \
>  		--enable-libvorbis \
>  		--enable-libvpx \
> +		--enable-libwebp \
>  		--enable-libx264 \
>  		--enable-libx265 \
>  		--enable-libxml2 \
>