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;

相关推荐
RisunJan2 分钟前
Linux命令-slabtop(实时显示内核 slab 缓存信息)
linux
zmzb010344 分钟前
C++课后习题训练记录Day175
开发语言·c++
啦啦啦啦啦zzzz1 小时前
工具:动态类工厂和用配置文件存储属性
c++·设计模式·工具·动态工厂
脱胎换骨-军哥1 小时前
C++ 代码规范与格式化指南
开发语言·c++·代码规范
蚰蜒螟3 小时前
从内核源码看Linux启动:chroot、execve与MS_MOVE的协奏曲
linux·服务器·网络
酷可达拉斯3 小时前
自动化运维-ansible配置文件与主机清单
linux·运维·自动化·ansible
影视飓风TIM3 小时前
Linux下C语言缓冲区原理 + Git版本控制
linux·c语言·git
迷途之人不知返3 小时前
lambda表达式
c++
@三十一Y3 小时前
C++:红黑树的实现
开发语言·c++
来者皆善4 小时前
ZYNQ linux上使用 USB CDC ACM
linux·运维·服务器