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 分钟前
【数据结构与算法】第19篇:树与二叉树的基础概念
c语言·开发语言·数据结构·c++·算法·visual studio code·visual studio
扛枪的书生27 分钟前
包管理器用法速查
linux
Zarek枫煜33 分钟前
[特殊字符] C3语言:传承C之高效,突破C之局限
c语言·开发语言·c++·单片机·嵌入式硬件·物联网·算法
寻寻觅觅☆1 小时前
东华OJ-基础题-30-求最晚和最早日期(C++)
数据结构·c++·算法
biubiubiu07061 小时前
Linux 中 `source` 和 `systemctl daemon-reload` 的区别与踩坑点
linux·运维·服务器
Lugas Luo1 小时前
SATA 硬盘识别延时:协议层与内核机制分析
linux·嵌入式硬件
lit_wei1 小时前
【Linux的以太网驱动的收发流程比较】
linux
ringking1231 小时前
Linux 主机通过 Wi-Fi 上网,并将网络通过网口共享给交换机下游设备
linux·服务器·网络
123过去1 小时前
rcracki_mt使用教程
linux·网络·测试工具
海参崴-1 小时前
【Linux 项目自动化构建工具 -- make/makefile && 版本管理 Git 的使用&&第一个程序
linux·git·自动化