linux c++ ffmpeg rtsp推流报错 rtsp://localhost:8554/Live: Protocol not found

根据报错内容rtsp://localhost:8554/Live: Protocol not found

意思是没有找到对应协议,添加以下红色字体指令解决,

std::string rtsp_server_url = "rtsp://localhost:8554/live";

std::stringstream command;

command << "ffmpeg ";

command << "-y " // overwrite output files

<< "-an " // disable audio

<< "-f rawvideo " // force format to rawvideo

<< "-vcodec rawvideo " // force video rawvideo ('copy' to copy stream)

<< "-pix_fmt bgr24 " // set pixel format to bgr24

<< "-s 640x516 " // set frame size (WxH or abbreviation)

<< "-r 25 "; // set frame rate (Hz value, fraction or abbreviation)

command << "-i - "; //

command << "-c:v libx264 " // Hyper fast Audio and Video encoder

<< "-pix_fmt yuv420p " // set pixel format to yuv420p

<< "-preset ultrafast " // set the libx264 encoding preset to ultrafast

<< "-f flv " // force format to flv

<< "-rtsp_transport tcp "

<< "-f rtsp "

<< rtsp_server_url;

相关推荐
贵州诚鑫致达科技有限公司7 小时前
Linux的yum源怎么重启?源不是服务
linux·运维·服务器
WL学习笔记10 小时前
C & C++ 内存管理
c++·c++内存管理
澜山奕秋10 小时前
RHCSA
linux·运维·服务器
Web极客码11 小时前
告别流式截断:我用客户端中间件解决长文本 API 跨国 SSE 断连与数据自愈
linux·agent 图
cnnews11 小时前
Chromebox3安装Ubuntu后内存化与最小化 eMMC 写入优化
linux·运维·ubuntu
flytalei12 小时前
Ubuntu 24.04 单节点 K3s 部署实践:从环境评估到故障排查与验收
linux·运维·ubuntu
Starry-sky(jing)12 小时前
Hermes Agent 部署后怎么升级?v0.21.7 Linux 源代码版实测
linux·人工智能·ai agent·版本升级·hermes agent
水饺编程12 小时前
第2章:Linux 基础,clear 命令
linux·c语言·汇编
宛 禾12 小时前
Qt 控件入门:QLabel 从拖拽到对象树,一篇讲透
c++·qt·学习
hetao173383713 小时前
联盟场-提高组-R7 & ZYZSC-S-Round 11
c++·算法