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;

相关推荐
REDcker28 分钟前
C++变量存储与ELF段布局详解 从const全局到rodata与nm_readelf验证实践
java·c++·面试
彩色的黑'''2 小时前
[root@localhost ~]#,Linux系统的命令提示符为啥现在变成-bash-4.2#了,哪里设置的
linux·运维·bash
源远流长jerry3 小时前
Linux 网络发送机制深度解析:从应用到网线
linux·服务器·网络·网络协议·tcp/ip
王老师青少年编程3 小时前
csp信奥赛C++高频考点专项训练之字符串 --【字符串排序】:合并序列
c++·字符串·csp·高频考点·信奥赛·字符串排序·合并序列
南境十里·墨染春水3 小时前
linux学习进展 shell编程
linux·运维·学习
goyeer3 小时前
【ITIL4】32服务实践 - 问题管理(Problem Management)
linux·运维·服务器·企业数字化·it管理·itil·it治理
handler013 小时前
UDP协议与网络通信知识点
c语言·网络·c++·笔记·网络协议·udp
神仙别闹4 小时前
基于QT(C++)实现学生成绩管理系统
数据库·c++·qt
怀旧,4 小时前
【Linux网络编程】8. 网络层协议 IP
linux·网络·tcp/ip
RH2312114 小时前
2026.5.12 Linux
java·linux·数据结构