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;

相关推荐
姚愚谦5 分钟前
Linux源码-通用双向链表的实现
linux
麦麦麦当劳大王9 分钟前
OpenClaw安装部署(Windows/Linux/MacOS)
linux·windows·macos
烁34711 分钟前
shell脚本简单语法
linux·娱乐
似水এ᭄往昔39 分钟前
【Linux系统编程】--命令行参数和环境变量
linux·运维·服务器
vortex540 分钟前
Linux 组管理命令工具链
linux·运维·服务器
艾莉丝努力练剑40 分钟前
【Linux网络】数据链路层协议(二):ARP协议
linux·运维·服务器·网络·计算机网络·udp
Rabitebla42 分钟前
C++ 多态详解:从概念到虚表底层原理(代码轰炸)
开发语言·c++
charlie1145141911 小时前
通用GUI编程技术——图形渲染实战(五十)——命中测试与鼠标事件路由:精确交互
c++·windows·架构·交互·图形渲染
hetao17338371 小时前
2026-05-25~06-11 hetao1733837 的刷题记录
c++·算法
洛水水1 小时前
【力扣100题】82.有效的括号
c++·算法·leetcode