树莓派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 来判断
相关推荐
泛黄的咖啡店15 分钟前
域名系统DNS
运维·云计算
dessler25 分钟前
Kubernetes(k8s)-集群监控(Prometheus)
linux·运维·kubernetes
一夜沐白25 分钟前
Linux用户管理
linux·运维·服务器·笔记
PLUS_WAVE1 小时前
【Tools】chezmoi 跨多台不同的机器管理 dotfiles 的工具
linux·服务器·软件工程·工具·chezmoi
喝养乐多长不高1 小时前
详细PostMan的安装和基本使用方法
java·服务器·前端·网络协议·测试工具·https·postman
薯条不要番茄酱1 小时前
【网络原理】从零开始深入理解TCP的各项特性和机制.(二)
服务器·网络·tcp/ip
Pasregret2 小时前
备忘录模式:实现对象状态撤销与恢复的设计模式
运维·服务器·设计模式
唐青枫2 小时前
Linux man 命令使用教程
linux
LuckyRich12 小时前
【仿Mudou库one thread per loop式并发服务器实现】服务器边缘测试+性能测试
服务器·c++
珹洺2 小时前
Linux红帽:RHCSA认证知识讲解(十 四)分区管理、交换分区,创建逻辑卷与调整逻辑卷的大小
linux·运维·服务器