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;

相关推荐
|_⊙2 分钟前
C++ 智能指针
开发语言·c++
小此方12 分钟前
Re:Linux系统篇(四)指令篇 · 三:两套打包压缩重要指令方法+剩余指令收尾
linux·运维·服务器
Jasmine_llq22 分钟前
《B4356 [GESP202506 二级] 数三角形》
开发语言·c++·双重循环枚举算法·顺序输入输出算法·去重枚举算法·整除判断算法·计数统计算法
冷风阿健23 分钟前
Linux 源码安装 Vim 9.2.0272 完整步骤(修复 CVE-2026-34714)
linux·运维·vim
w_t_y_y24 分钟前
Claude Code(二)rules
linux·运维·ubuntu
山栀shanzhi26 分钟前
在做直播时,I帧的间隔(GOP)一般是多少?
网络·c++·面试·ffmpeg
白菜欣26 分钟前
Linux —《从零上手Vim:核心用法全解析》
linux·编辑器·vim
王老师青少年编程1 小时前
csp信奥赛C++高频考点专项训练之贪心算法 --【排序贪心】:魔法
c++·算法·贪心·csp·信奥赛·排序贪心·魔法
平行云1 小时前
虚拟直播混合式2D/3D应用程序实时云渲染推流解决方案
linux·unity·云原生·ue5·图形渲染·实时云渲染·像素流送
晓觉儿1 小时前
【GPLT】2026年第十一届团队程序设计天梯赛赛后题解(已写2h,存档中)
数据结构·c++·算法·深度优先·图论