ffmpeg编译支持AVS3编解码

  1. 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库了。

  1. 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         
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值