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 小时前
麒麟Zabbix Agent安装配置全攻略
linux·服务器·zabbix
sqmw2 小时前
MFCMouseEffect:把桌面输入反馈这件事,做成一个真正可扩展的引擎
c++·插件·引擎·鼠标特效·键鼠指示·鼠标伴宠
沈阳信息学奥赛培训3 小时前
#undef 指令 (C/C++)
c语言·开发语言·c++
2401_873204653 小时前
分布式系统安全通信
开发语言·c++·算法
sw1213894 小时前
C++中的代理模式实战
开发语言·c++·算法
Sunshine for you5 小时前
实时操作系统中的C++
开发语言·c++·算法
史蒂芬_丁5 小时前
C++深度拷贝例子
java·开发语言·c++
似水এ᭄往昔5 小时前
【Linux】自动化构建-make/Makefile
linux·运维·服务器·ubuntu
「QT(C++)开发工程师」5 小时前
C++11三大核心特性深度解析:类型特征、时间库与原子操作
java·c++·算法
顶点多余6 小时前
Linux“信号“从硬件到软件详解
linux·运维·服务器