编译 | Compile - jjm2473/ffmpeg-rk GitHub Wiki

CHS:

正常的编译就不多说了,依赖 Rockchip 的 MPP 和 RGA ,以及 libdrm, libx264。

示例编译命令(根据自己的环境调整参数):

./configure --enable-cross-compile --cross-prefix="aarch64-linux-gnu-" --arch="aarch64" --cpu=cortex-a53 --target-os=linux --prefix="/usr" --pkg-config="pkg-config" --enable-shared --enable-static --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-runtime-cpudetect --enable-lto --enable-neon --enable-vfp --enable-gnutls --disable-encoder="svq1" --enable-libopus --enable-hardcoded-tables --enable-libmp3lame --enable-gpl --enable-libx264 --enable-version3 --enable-nonfree --enable-libdrm --enable-librga --enable-rkmpp --enable-libfdk-aac

make -j4

注意configure阶段--enable-gpl --enable-libx264 --enable-version3 --enable-nonfree --enable-libdrm --enable-librga --enable-rkmpp都是必需的。交叉编译相关的问题请勿反馈,自行解决。

如果是 OpenWRT 编译,不用浪费时间研究,直接使用这些代码:

如果打算使用 Docker 部署 Jellyfin,那也不需要自己编译,直接使用我编译好的镜像:

如果要自己编译,但是不熟悉交叉编译环境的搭建,可以使用 Docker 虚拟 arm64 环境编译,但是速度非常慢(arm64v8/debian 镜像,参考 Docker 运行跨平台镜像 ):

./configure --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --enable-lto --enable-neon --enable-vfp --enable-gnutls --enable-libopus --enable-hardcoded-tables --enable-libmp3lame --enable-gpl --enable-libx264 --enable-version3 --enable-nonfree --enable-libdrm --enable-librga --enable-rkmpp --enable-libfdk-aac

make -j4

ENG:

This project depends on Rockchip's MPP and RGA, and libdrm, libx264.

Example compilation command (adjust parameters according to your own environment):

./configure --enable-cross-compile --cross-prefix="aarch64-linux-gnu-" --arch="aarch64" --cpu=cortex-a53 --target-os=linux --prefix="/usr" --pkg-config="pkg-config" --enable-shared --enable-static --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-runtime-cpudetect --enable-lto --enable-neon --enable-vfp --enable-gnutls --disable-encoder="svq1" --enable-libopus --enable-hardcoded-tables --enable-libmp3lame --enable-gpl --enable-libx264 --enable-version3 --enable-nonfree --enable-libdrm --enable-librga --enable-rkmpp --enable-libfdk-aac

make -j4

Note that the configure phase --enable-gpl --enable-libx264 --enable-version3 --enable-nonfree --enable-libdrm --enable-librga --enable-rkmpp is required. Please do not report problems related to cross-compilation, and solve them by yourself.

If you are working with OpenWRT, don't waste your time on tuning compilation parameters, just use these Makefiles:

If you plan to use Docker to deploy Jellyfin, you don’t need to compile it yourself, just use the image I compiled: