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;

相关推荐
txzrxz36 分钟前
单调队列讲解
数据结构·c++·算法·单调队列
WWTYYDS_6661 小时前
JsonCpp超详细使用教程
c++
Joey_friends2 小时前
指纹authenticate流程图
android·java·c++
小小晓.2 小时前
C++小白记:C风格字符串和数组用法
c语言·开发语言·c++
BelongPanda2 小时前
Linux Nginx 纯手动 Let‘s Encrypt 泛域名证书配置教程
linux·nginx
酷可达拉斯2 小时前
Linux操作系统-shell编程(0)
linux·运维·服务器·python·云计算
cpp_25012 小时前
P1540 [NOIP 2010 提高组] 机器翻译
数据结构·c++·算法·队列·noip·洛谷题解
2301_777998342 小时前
Linux中断机制:操作系统如何高效运行
linux·运维·服务器
yunwei372 小时前
eBPF 教程:检查 exec 后真正安装的可执行镜像
linux·开源
咕白m6253 小时前
通过 C++ 写入数据到 Excel 文档
c++·后端