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;

相关推荐
二进制人工智能1 小时前
【QT5 网络编程示例】TCP 通信
网络·c++·qt·tcp/ip
多多*2 小时前
Java设计模式 简单工厂模式 工厂方法模式 抽象工厂模式 模版工厂模式 模式对比
java·linux·运维·服务器·stm32·单片机·嵌入式硬件
莫有杯子的龙潭峡谷3 小时前
3.31 代码随想录第三十一天打卡
c++·算法
南鸳6104 小时前
Linux常见操作命令(2)
linux·运维·服务器
AaronZZH4 小时前
【进阶】vscode 中使用 cmake 编译调试 C++ 工程
c++·ide·vscode
fengwuJ4 小时前
Linux安装Idea
linux·ubuntu·debian·intellij-idea
杨筱毅4 小时前
【性能优化点滴】odygrd/quill 中将 MacroMetadata 变量声明为 constexpr
c++·性能优化
NaZiMeKiY4 小时前
C++ 结构体与函数
开发语言·c++
西北大程序猿5 小时前
linux进程信号 ─── linux第27课
linux·运维·服务器·信号处理
涛ing5 小时前
【Git “fetch“ 命令详解】
linux·c语言·c++·人工智能·git·vscode·svn