On 7/21/2021 6:51 AM, Marc Espie wrote:
vid.stab is a video stabilization library that interfaces with ffmpeg.
From the xml plugins in kdenlive, I suspect it will work out of the box there
as well.
Here's the patch to activate it in ffmpeg. From simple tests, it seems to
work as advertized.
(I have bumped avfilter because it gains a new interface AND a new library
dependency)
(The port itself is attached)
The FFmpeg part is straightforward and Ok with me.
Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/Makefile,v
retrieving revision 1.210
diff -u -p -r1.210 Makefile
--- Makefile 9 Jul 2021 10:43:26 -0000 1.210
+++ Makefile 21 Jul 2021 10:47:56 -0000
@@ -4,7 +4,7 @@ COMMENT= audio/video converter and strea
V= 4.4
DISTNAME= ffmpeg-${V}
-REVISION= 0
+REVISION= 1
EPOCH= 1
CATEGORIES= graphics multimedia
MASTER_SITES= https://ffmpeg.org/releases/
@@ -12,7 +12,7 @@ EXTRACT_SUFX= .tar.xz
SHARED_LIBS= avcodec 25.0 \
avdevice 13.0 \
- avfilter 10.0 \
+ avfilter 11.0 \
avformat 22.0 \
avresample 2.0 \
avutil 15.0 \
@@ -31,7 +31,7 @@ WANTLIB+= SDL2 X11 Xext Xv aom ass bz2 c
WANTLIB+= freetype fribidi gsm iconv lzma m mp3lame opus
WANTLIB+= pthread sndio speex ssl theoradec theoraenc v4l2
WANTLIB+= vorbis vorbisenc vpx x264 x265 xcb xcb-shape xcb-shm
-WANTLIB+= xcb-xfixes xml2 xvidcore z
+WANTLIB+= xcb-xfixes xml2 xvidcore vidstab z
COMPILER= base-clang ports-gcc
COMPILER_LANGS= c
@@ -56,6 +56,7 @@ LIB_DEPENDS= archivers/bzip2 \
multimedia/libass \
multimedia/libtheora \
multimedia/libv4l \
+ multimedia/libvidstab \
multimedia/libvpx \
multimedia/x264 \
multimedia/x265 \
@@ -65,7 +66,7 @@ LIB_DEPENDS= archivers/bzip2 \
# inter-library dependencies for the current configuration
LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -laom -ldav1d -lgsm -liconv -llzma
-lmp3lame -lopus -lspeex -ltheoradec -ltheoraenc -lvorbis -lvorbisenc -lvpx
-lx264 -lx265 -lxvidcore -lm -lz -pthread
LIBavdevice_EXTRALIBS=-L${LOCALBASE}/lib -L${X11BASE}/lib -lX11 -lXext -lXv
-lxcb-shape -lxcb-shm -lxcb-xfixes -lxcb -lsndio -lv4l2 -lm
-LIBavfilter_EXTRALIBS=-L${LOCALBASE}/lib -L${X11BASE}/lib -lass -lfontconfig
-lfreetype -lfribidi -lm -lz -pthread
+LIBavfilter_EXTRALIBS=-L${LOCALBASE}/lib -L${X11BASE}/lib -lass -lfontconfig
-lfreetype -lfribidi -lvidstab -lm -lz -pthread
LIBavformat_EXTRALIBS=-L${LOCALBASE}/lib -lbz2 -lxml2 -lssl -lcrypto -lm -lz
LIBavresample_EXTRALIBS=-lm
LIBavutil_EXTRALIBS=-lm -pthread
@@ -118,6 +119,7 @@ CONFIGURE_ARGS+=--enable-shared \
--enable-libxvid \
--enable-nonfree \
--enable-openssl \
+ --enable-libvidstab \
--extra-cflags="-I${LOCALBASE}/include -I${X11BASE}/include" \
--extra-libs="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
--extra-ldsoflags="${LDLIBFLAGS}" \