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 内核中断处理机制与软硬件协同流程
linux·嵌入式硬件
杜 硕7 小时前
从零开始的C++生活——第六讲——01
开发语言·c++·生活
Ruiery7 小时前
Linux 6.6内核并发与同步(五):mutex 可睡眠锁
linux·运维·服务器
莫晓燚7 小时前
双机部署若依 (RuoYi‑Vue) 传统环境部署---实战
linux·运维·数据库·redis·mysql·nginx·ruoyi
CQU_JIAKE9 小时前
10.30【A】
linux
Zevalin爱灰灰9 小时前
Linux入门第二部分(ARM裸机篇) 第一章 开发环境搭建与了解
linux·arm开发·嵌入式
zslefour9 小时前
使用ffmpeg遍历获取音频文件相关信息
ffmpeg
Risehuxyc9 小时前
C++(VS2026)使用Ncap库的配置
c++
LHICOD10 小时前
Linux-2
java·linux·后端·jar·vmware·svm·vm
4ever.ov010 小时前
精学C++第一站 从命名空间到引用:C++入门核心语法全梳理(13000字长文)
开发语言·c++·clion