树莓派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 来判断
相关推荐
cuijiecheng201815 分钟前
从 GinormoTime 到 Rocky Linux:25fps LTC 完整搭建与验证实战
linux·运维·服务器
GeW19 分钟前
告别盲目刷题!RHCE高效备考路线图,助你一次Pass
linux
H_oRIZoN_1 小时前
Linux入门DAY35(TCP粘包问题与HTTP)
linux·tcp/ip·http
好评1241 小时前
【Linux】传输层协议TCP
linux·网络·tcp/ip
Shell运维手记1 小时前
Linux mdadm 软 RAID + LVM 完整综合笔记
linux·运维·笔记·5g
凤舞飘伶1 小时前
服务器内存满日常运维命令
linux·运维·服务器
Fcy6482 小时前
Linux下 Socket编程 —— TCP网络编程
linux·网络·tcp/ip
IPdodo_2 小时前
静态 IP 访问异常排查:403/429 归因与迁移验收
服务器·网络·数据库·python·网络协议·php·性能测试
hflmwl83 小时前
Motrix电脑版官网免费下载,motrix服务器绿色版官方下载安装
运维·服务器·motrix
LongRunning3 小时前
【Linux】RK3568(三)操作-视频流
linux