site  contact  subhomenews

Frei0r compiled in OpenEmbedded

January 15, 2022 — BarryK

Frei0r is a library of video effects. It is used in many video editors, including LiVES and Flowblade. It is also an optional dependancy of MLT. MLT is a dependency of Flowblade and some other video editors (Kdenlive, Openshot, Shotcut). Here is the frei0r home page:

I have now compiled frei0r in OpenEmbedded. The source supports building with either cmake or autotools, and OE defaulted to using cmake, which was a headache -- sometimes cmake is not cross-compiler-friendly. I changed the recipe to use autotools, and succeeded. Here is the recipe, file meta-quirky/recipes-quirky/frei0r/

# Recipe created by recipetool
# recipetool create -o
# note: package supports both cmake and autotools.

LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"

SRC_URI = "${PV}.tar.gz \
file://1001_fix_metainformation.patch \

SRC_URI[md5sum] = "d46006b92c3382a2f3260804249dcc11"
SRC_URI[sha256sum] = "6f7cf95ea2257687cc31db0ed9c9bc0eec152e953d515f346eabec048ed2b29d"

DEPENDS = "cairo zlib libxxf86vm libxrender libxfixes libxext libxdmcp libxdamage \
libxcb libxau libx11 util-linux libpng pixman mesa freetype fontconfig \
expat libdrm libjpeg-turbo"

inherit pkgconfig autotools

EXTRA_OECONF = "--disable-cpuflags --without-opencv"

#| ../../frei0r-1.7.0/src/filter/ndvi/ndvi.cpp:21:10: fatal error: frei0r.hpp: No such file or directory
#| 21 | #include "frei0r.hpp"
# ...i got it from debian. ***NO*** hey, it is already in the source...
do_compile_prepend() {
cp -f ${S}/include/frei0r.hpp ${S}/src/filter/ndvi/
cp -f ${S}/include/frei0r.h ${S}/src/filter/ndvi/
cp -f ${S}/include/frei0r_cairo.h ${S}/src/filter/ndvi/
cp -f ${S}/include/frei0r_cfc.h ${S}/src/filter/ndvi/
cp -f ${S}/include/frei0r_colorspace.h ${S}/src/filter/ndvi/
cp -f ${S}/include/frei0r_math.h ${S}/src/filter/ndvi/
cp -f ${S}/include/blur.h ${S}/src/filter/ndvi/

#see error msg below. fix...
sed -i -e 's%^docs_DATA =.*%docs_DATA = %' ${B}/Makefile

#| make[1]: Entering directory '/mnt/sda1/nvme/oe-builds/oe-quirky/build-amd64/tmp/work/nocona-64-poky-linux/frei0r/1.7.0-r6/build'
#| make[1]: *** No rule to make target 'README.txt', needed by 'all-am'. Stop.
#| make[1]: Leaving directory '/mnt/sda1/nvme/oe-builds/oe-quirky/build-amd64/tmp/work/nocona-64-poky-linux/frei0r/1.7.0-r6/build'

#install this as well, like debian does...
do_install_append() {
install ${S}/include/frei0r.hpp ${D}/usr/include

SUMMARY = "A minimalistic plugin API for video effects"

I then added frei0r as a dependency in the mlt recipe, here is file meta-quirky/recipes-support/mlt/

# Recipe created by recipetool
# recipetool create -o

#20220115 bump r6 to r7...
PR = "r${@int(PR_NUM) + 1}"

LICENSE = "LGPLv2.1 & GPLv2 & GPLv3 & MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=4b54a1fd55a448865a0b32d41598759d \
file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://GPLv3;md5=d32239bcb673463ab874e80d47fae504 \

SRC_URI = "${PV}.tar.gz"
SRC_URI[md5sum] = "4bc74ec681e67310340bafc235178a81"
SRC_URI[sha256sum] = "17c19843ffdbca66777aaadf39acb11829fd930eaded92f768cbcb8ae59a5f37"

#removed: tcl-native ruby-native
# 20220115 add: frei0r removed: python3-native
DEPENDS = "libx11 swig-native qtbase virtual/libgl \
libsdl libsdl2 ffmpeg zlib libxxf86vm libxv xvidcore libxtst libxshmfence \
libxrender libxrandr libxml2 libxi libxfixes libxext libxdmcp libxdamage \
libxcb libxau x265 x264 libx11 libwebp wavpack libvpx libvorbis libvdpau \
libva v4l-utils util-linux libusb1 eudev libtheora openssl speex speexdsp \
sox libsndfile1 libsndfile1-native libsm libsamplerate0 libraw1394 \
qtdeclarative qtscript qtsvg qttools qtx11extras qtxmlpatterns \
pulseaudio libpthread-stubs libpthread-stubs-native libpng libpcre libpcre2 \
pango opencore-amr libogg lame libmad xz libjpeg-turbo libid3tag icu \
libice harfbuzz graphite2 mesa glib-2.0 glib-2.0-native gdk-pixbuf fribidi \
freetype fontconfig flac fftw libffi expat libexif libdrm libdc1394 \
libcdio-paranoia libcdio libcap bzip2 libbluray ffmpeg libao alsa-lib \
swig lua-native perl-native frei0r"

# 20220115 just guessing, add python*...
inherit cmake cmake_qt5 pkgconfig python3-dir python3native

#removed: -DCPU_SSE2=OFF
# 20220115 frei0r now on...

#| ninja: error: multiple rules generate out/lib/ [-w dupbuild=err]
#fix, ref:
EXTRA_OECMAKE_BUILD += "-w dupbuild=warn"

#| CMake Error at src/swig/perl/cmake_install.cmake:50 (file):
#| file RPATH_CHANGE could not write new RPATH:
# have changed -DSWIG_PERL to OFF.

SUMMARY = "MLT Multimedia Framework"

When the author of lives fixes the bugs, I intend to update the recipe in OE, adding frei0r dependency.

Testing flowblade in Easy 3.2.1, try to do a transition effect between two clips and flowblade crashes. I am hoping that adding frei0r will fix that.   

Tags: easy