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;

相关推荐
我想要SSR几秒前
搭建小龙虾过程和坑点
linux·服务器·ai
王璐WL32 分钟前
【C++】类的默认成员函数(上)
c++
王老师青少年编程1 小时前
csp信奥赛C++高频考点专项训练之贪心算法 --【区间贪心】:区间覆盖(加强版)
c++·算法·贪心·csp·信奥赛·区间贪心·区间覆盖(加强版)
宏笋1 小时前
C++11完美转发的作用和用法
c++
莫白媛1 小时前
Linux在限制敏感命令下的修改用户密码小白版
linux·运维·服务器
格发许可优化管理系统1 小时前
MathCAD许可类型全面解析:选择最适合您的许可证
c++
旖-旎2 小时前
深搜(二叉树的所有路径)(6)
c++·算法·leetcode·深度优先·递归
Rcnhtin2 小时前
RocketMQ
java·linux·rocketmq
GIS阵地2 小时前
QGIS的分类渲染核心类解析
c++·qgis·开源gis
凯瑟琳.奥古斯特3 小时前
C++变量与基本类型精解
开发语言·c++