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 小时前
第四章 更多的bash shell命令
linux·开发语言·bash
lunar_coder2 小时前
【算法】前缀和:把 O(n) 的重复劳动变成 O(1) 的一次查询
c++·算法
青少儿编程课堂2 小时前
第十八届蓝桥杯青少组图形化 + 全国青少年信息素养大赛 + 电子学会图形化考级:校园三消乐大挑战解析
c++·python·算法·bfs·信息学竞赛
青少儿编程课堂3 小时前
蓝桥杯·全国青少年信息素养大赛·电子学会Python/C++考级:网格连通块与岛屿数量(DFS+BFS双解)
c++·python·算法·bfs·信息学竞赛
进击的荆棘3 小时前
Linux网络——网络基础概念
linux·运维·服务器·网络
.YM.Z3 小时前
从操作系统进入Linux进程概念及进程状态
linux·运维·服务器
忆挽篱笙歌9 小时前
通信连接,匿名管道
linux·服务器·网络
码客-ygluu11 小时前
X3 LUA 异步分布式微服务集群框架
c++·架构·lua
无足鸟ICT12 小时前
【RHCA+】安装Tuned
linux·服务器·centos
九英里路14 小时前
protobuf快速上手
网络·c++·中间件·json·谷歌·序列化·protobuf