+CC FFmpeg maintainer.

On 2021/07/22 12:39, Charlene Wendling wrote:
> Hi Marc,
> 
> On Wed, 21 Jul 2021 12:51:18 +0200
> Marc Espie <es...@nerim.net> 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)
> 
> Trying to build on powerpc led to some issues:
> 
> - The SSE checks don't work with OpenBSD (see the terrible
>   CMakeModules/FindSSE.cmake), and reported SSE2 support on powerpc,
>   breaking the build searching for headers that indeed cannot be found.
> 
>   I've disabled all SSE checks on !amd64, so it does not try to build
>   the port with instruction sets that are not available. As such,
>   libvidstab still uses SSE2 on amd64, and nothing on all other arches.
> 
>   I know some i386 support SSE2, but not all. I'll let sthen@ decide.
> 
> - I've met several instance of char used to store (f)getc return values.
>   It should be int instead, and as such the patch i bring fixes possible
>   infinite loops on powerpc and arm*.
> 
> - I've removed optimization flags because the port was build with -O3.
> 
> 
> I've attached a new port with these fixes.
> 
> On amd64, i've tested with 'ffplay -vf vidstabdetect=show=1 [...]',
> where it seems to work.
> 
> On macppc, the library is built successfully, but given how video
> playback is slow there, i would not dare to use that filter. I'm
> building ffmpeg atm. I'll report back if issues arise, i've some time,
> because it should be tested on more archs, ffmpeg is indeed an important
> port.

It doesn't do a runtime cpuid check like most video-related software
manages, so it should be disabled on i386.

libvidstab builds OK on i386. I'm in the middle of a bulk so I haven't
done runtime tests or built ffmpeg.

> 
> 
> 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}" \
> 


Reply via email to