树莓派4B安装ffmpeg


树莓派4B安装ffmpeg

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
  1. 安装H264
   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
  1. 安装ffmpeg
   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

  1. 测试
   ffmpeg -i 11_test.wmv -y -qscale 0 -vcodec libx264 test.mp4


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM