树莓派4B安装ffmpeg

环境:

bash 复制代码
pi@raspberrypi:~/x264 $ lsb_release  -a
   No LSB modules are available.
   Distributor ID: Raspbian
   Description:    Raspbian GNU/Linux 10 (buster)
   Release:        10
   Codename:       buster

装H264

bash 复制代码
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

装ffmpeg

bash 复制代码
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

如果下载慢,可以手工下载源码https://ffmpeg.org/download.html

测试

bash 复制代码
ffmpeg -i 1.wmv -y -qscale 0 -vcodec libx264 11.mp4
 

实时视频推拉流:

bash 复制代码
流服务可自行使用nginx+rtmp模板部署,

拉流:
ffplay rtmp://{serverIP}/live/stream


推流
windows: ffmpeg -f dshow -i video="USB2.0_CAM1" -vcodec libx264 -f flv rtmp://{serverIP}/live/stream

windows使用命令ffmpeg.exe -list_devices true -f dshow -i dummy 来查看对应摄像头的名字


linux: ffmpeg -f v4l2 -i /dev/video0 -vcodec libx264 -f flv rtmp://{serverIP}/live/stream
linux则通过 /dev/videoN 来判断
相关推荐
wanhengidc16 分钟前
操作简单稳定选巨 椰 云手机
运维·服务器·游戏·智能手机·云计算
wanhengidc17 分钟前
云手机公认的优势有什么
运维·服务器·游戏·智能手机·玩游戏
一匹电信狗30 分钟前
【C++】C++风格的类型转换
服务器·开发语言·c++·leetcode·小程序·stl·visual studio
赖small强33 分钟前
Linux 页缓存(Page Cache)与回写(Writeback)机制详解
linux·页缓存(page cache)·回写(writeback)·脏页
中科米堆36 分钟前
中科米堆CASAIM自动化三维测量实现注塑模具快速尺寸测量
运维·人工智能·自动化
蓝冰印44 分钟前
HarmonyOS Next 快速参考手册
linux·ubuntu·harmonyos
---学无止境---1 小时前
Linux中在字符串中查找指定字符的第一次出现位置的汇编实现
linux
老龄程序员1 小时前
基于OpenIddict6.4.0搭建授权认证服务
运维·服务器·identityserver
tianyuanwo1 小时前
虚拟机监控全攻略:从基础到云原生实战
linux·云原生·虚机监控
别或许1 小时前
在centos系统下,安装MYSQL
linux·mysql·centos