- libuavs3d
ffmpeg的官方源码中已经支持了libuavs3d解码器的接口(libavcodec/libuavs3d.c中定义),因此如果需要编译ffmpeg支持libuavs3d解码器,只需要安装libuavs3d.so以及开启ffmpeg的编译选项即可。
安装libuavs3d解码器
#代码仓库
git clone https://github.com/uavs3/uavs3d.git
#可以参考其仓库说明安装,这里使用linux平台
apt install gawk cmake #安装依赖
cd uavs3d
mkdir build/linux
cd build/linux
cmake -DCOMPILE_10BIT=1 -DBUILD_SHARED_LIBS=1 --install-prefix=/usr ../..
make && make install
libuavs3d会安装的文件:
/usr/lib/libuavs3d.so
/usr/include/uavs3d.h
/usr/lib/pkgconfig/uavs3d.pc
如果编译得时候没有-DBUILD_SHARED_LIBS,则uavs3d不会生成libuavs3d.so,静态链接生成uavs3dec可执行文件,这样ffmpeg就不能使用libuavs3d库了。
- libuavs3e
ffmpeg官方源码中还未添加对libuavs3e库的支持,需要做一点修改。
安装libuavs3e编码器
#代码仓库
git clone https://github.com/uavs3/uavs3d.git
apt install gawk cmake #安装依赖
cd uavs3e
mkdir build/linux
cd build/linux
cmake -DCOMPILE_10BIT=1 -DBUILD_SHARED_LIBS=1 --install-prefix=/usr ../..
make && make install
uavs3e安装的文件比uavs3d的多一个
/usr/lib/libuavs3e.so
/usr/include/uavs3e/uavs3e.h
/usr/include/uavs3e/com_api.h
/usr/lib/pkgconfig/uavs3e.pc
ffmpeg添加libuavs3e.c及接口支持
#libavs3e.c开源代码仓库
git clone https://github.com/uavs3/uavs3e_ffmpeg_interface.git
ffmpeg中configure修改以及allcodecs.c修改:
diff --git a/configure b/configure
index 838e627084..e95345aaf2 100755
--- a/configure
+++ b/configure
@@ -279,6 +279,7 @@ External library support:
if openssl, gnutls or mbedtls is not used [no]
--enable-libtwolame enable MP2 encoding via libtwolame [no]
--enable-libuavs3d enable AVS3 decoding via libuavs3d [no]
+ --enable-libuavs3e enable AVS3 encoding via libuavs3e [no]
--enable-libv4l2 enable libv4l2/v4l-utils [no]
--enable-libvidstab enable video stabilization using vid.stab [no]
--enable-libvmaf