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;

相关推荐
WW_千谷山4_sch9 分钟前
MYOJ_10599:CSP初赛题单10:计算机网络
c++·计算机网络·算法
2301_7809438425 分钟前
linux 对文件打补丁(Patch)
linux·运维·服务器
敬往事一杯酒哈35 分钟前
Ubuntu 20.04 安装Anacada
linux·运维·ubuntu
Lam㊣38 分钟前
服务器端口转发的方法
linux·服务器
zxnbmk39 分钟前
【7】Kubernetes存储(本章知识密度较高,仅浅浅了解后续详解)
linux·云原生·容器·kubernetes
ChangYan.39 分钟前
Windows命令行(cmd)下快速查找文件路径(类似Linux下find命令)
linux·运维·服务器
梵尔纳多43 分钟前
绘制一个矩形
c++·图形渲染·opengl
橘颂TA1 小时前
【剑斩OFFER】算法的暴力美学——leetCode 946 题:验证栈序列
c++·算法·leetcode·职场和发展·结构与算法
Hey小孩1 小时前
[个人总结] LDD3:3.字符驱动 - scull(4)
linux·驱动开发
闻缺陷则喜何志丹1 小时前
【状态机动态规划】3686. 稳定子序列的数量|1969
c++·算法·动态规划·力扣·状态机动态规划