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;

相关推荐
持力行6 小时前
从C struct到C++中的class
c语言·c++
不能跑的代码不是好代码7 小时前
Linux系统常用命令中文速查表
linux·运维·服务器
石一峰6998 小时前
深入理解 Linux 中断三层机制与 1-Wire 时序锁原理
linux·运维·服务器
无限码农9 小时前
Linux上通过cmake编译uchardet
linux·运维·服务器
GIS阵地9 小时前
QgsRasterDataProvider 完整详解(QGIS 3.40.13 C++)
开发语言·c++·qt·开源软件·qgis
运维大师10 小时前
【Linux运维极简教程】06-网络配置与管理
linux·运维
charlie11451419112 小时前
Cinux: 为大内核铺路
开发语言·c++·操作系统·现代c++
探索云原生13 小时前
终于搞懂 Kueue:5 个核心对象一次讲透
linux·docker·ai·云原生·kubernetes
An_s14 小时前
机器学习python之识别图中物品信息
java·linux·开发语言
米罗篮14 小时前
矩阵快速幂 (Exponentiation By Squaring Applied To Matrices)
c++·线性代数·算法·矩阵