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;

相关推荐
Hard but lovely1 分钟前
linux: pthread库的使用和理解
linux
爱学习的小邓同学21 分钟前
C++ --- 多态
开发语言·c++
这儿有一堆花2 小时前
Kali Linux:探测存活到挖掘漏洞
linux·运维·服务器
松涛和鸣2 小时前
从零开始理解 C 语言函数指针与回调机制
linux·c语言·开发语言·嵌入式硬件·排序算法
皮小白3 小时前
ubuntu开机检查磁盘失败进入应急模式如何修复
linux·运维·ubuntu
潇湘秦3 小时前
一次微小的CPU波动,你能查到什么?
ffmpeg
邂逅星河浪漫3 小时前
【CentOS】虚拟机网卡IP地址修改步骤
linux·运维·centos
hhwyqwqhhwy3 小时前
linux 驱动开发相关
linux·驱动开发
IT逆夜4 小时前
实现Yum本地仓库自动同步的完整方案(CentOS 7)
linux·运维·windows
S***26754 小时前
linux上redis升级
linux·运维·redis