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;

相关推荐
远离UE45 小时前
UE5 compute shader 原子加
开发语言·c++·ue5
C+-C资深大佬5 小时前
C++ 显式类型转换详解:static_cast、dynamic_cast、const_cast、reinterpret_cast
开发语言·c++
luj_17687 小时前
心形曲线轨迹控制三大关键技术
c语言·开发语言·c++·经验分享·算法
取地址符7 小时前
C++学习笔记(基于learn-cxx)(1)
c++·经验分享·笔记·学习
RisunJan7 小时前
Linux命令-rlogin(远程登录)
linux·运维
思麟呀7 小时前
C++17(三)if constexpr+折叠表达式
开发语言·c++
ysa0510308 小时前
【板子】ST表
c++·笔记·算法·板子
CHHH_HHH8 小时前
【C++11】深入解析C++可变参数模板
开发语言·c++·算法·stl·c++11
十五年专注C++开发9 小时前
fatal error C1189: #error: WinSock.h has already been included 的解决方案
c++·socket·boost
大飞记Python10 小时前
Linux命令速查手册(测试开发4年实战总结,附PDF)
linux·网络·pdf