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;

相关推荐
苦逼大学生被编程薄纱43 分钟前
Ext 文件系统基础:Linux 存储基石入门(下)
linux·运维·服务器
Lumos_7771 小时前
Linux -- 进程
linux·运维·服务器
小苗卷不动1 小时前
OJ练习之疯狂的自我检索者(简单)
c++
LUVK_1 小时前
第七章查找
数据结构·c++·考研·算法·408
迷途之人不知返1 小时前
vector
c++
khalil10201 小时前
代码随想录算法训练营Day-31贪心算法 | 56. 合并区间、738. 单调递增的数字、968. 监控二叉树
数据结构·c++·算法·leetcode·贪心算法·二叉树·递归
小苗卷不动1 小时前
进程与线程的核心区别
c++
南境十里·墨染春水1 小时前
linux学习进展 进程间通讯——共享内存
linux·数据库·学习
小此方1 小时前
Re:Linux系统篇(五)指令篇 ·四:shell外壳程序及其工作原理
linux·运维·服务器
啊我不会诶2 小时前
2024ICPC西安邀请赛补题
c++·算法