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;

相关推荐
SPC的存折2 分钟前
3、Ansible之playbook模块大全
linux·运维·网络·python
桌面运维家10 分钟前
Linux SSH安全:密钥认证与端口防护实战指南
linux·安全·ssh
qq_2837200517 分钟前
C++ 基础:STL 原理介绍 + 实用技巧
c++·stl·c·模板库
量子炒饭大师19 分钟前
【C++模板进阶】——【非类型模板参数 / 模板的特化 / 模板分离编译】
开发语言·c++·dubbo·模板·非类型模板·模板的特化·模板分离编译
朱一头zcy30 分钟前
使用YUM源报错:curl#6 - “Could not resolve host: mirrorlist.centos.org; 未知的错误“
linux·centos7
白藏y33 分钟前
【脚手架】Protobuf基础使用
c++·protobuf
南境十里·墨染春水37 分钟前
C++笔记 构造函数 析构函数 及二者关系(面向对象)
开发语言·c++·笔记·ecmascript
OxyTheCrack1 小时前
【C++】一篇文章详解C++17新特性
c++
源远流长jerry1 小时前
NFV(网络功能虚拟化):重塑未来网络架构的革命性技术
linux·服务器·网络·架构
原来是猿1 小时前
进程间通信(三):命名管道
linux·服务器·网络·git