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;

相关推荐
无限进步_2 分钟前
【C++&string】寻找字符串中第一个唯一字符:两种经典解法详解
开发语言·c++·git·算法·github·哈希算法·visual studio
木下~learning14 分钟前
零基础Git入门:Linux+Gitee实战指南
linux·git·gitee·github·虚拟机·版本控制·ubunt
IMPYLH26 分钟前
Linux 的 mkdir 命令
linux·运维·服务器·bash
yy_xzz29 分钟前
【Linux开发】多线程并发服务器(网络编程+多线程+线程同步实现的聊天服务器和客户端)
linux·服务器·网络
电子阿板34 分钟前
ubuntu虚拟机查看tusb8041扩展坞及U盘的设置方法
linux·运维·ubuntu
深邃-35 分钟前
【C语言】-数据在内存中的存储(1)
c语言·开发语言·数据结构·c++·算法
孤影过客36 分钟前
Linux下的PostgreSQL集群演进指南
linux·运维·postgresql
xiaoye-duck42 分钟前
《算法题讲解指南:优选算法-字符串》--61.最长公共前缀,62.最长回文子串,63.二进制求和,64.字符串相乘
c++·算法·字符串
chh5631 小时前
从零开始学C++--类和对象
java·开发语言·c++·学习·算法
嵌入式届的关宏峰1 小时前
RV1126开发总结
linux