FFmpeg 是一套开源的音视频编解码库,有非常强大的功能,包括视频采集功能、视频格式转换等。众所周知视频编解码是一个非常消耗系统资源的过程,而树莓派自带了 H.264 的硬件编解码器,因此本文将详解在树莓派配置 FFmpeg 使其支持硬件编解码器并编译安装的过程。
环境:
pi@raspberrypi:~/x264 $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
git clone --depth 1 https://code.videolan.org/videolan/x264
# 进入文件
cd x264
./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
make -j4
sudo make install
git clone git://source.ffmpeg.org/ffmpeg --depth=1
cd ffmpeg
./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree
make -j4
sudo make install
ffmpeg -i 11_test.wmv -y -qscale 0 -vcodec libx264 test.mp4
原文:https://www.cnblogs.com/michaelcjl/p/14732849.html