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;

相关推荐
小雪_Snow4 分钟前
CentOS 7 安装 docker 教程
linux·docker·centos
凤凰战士芭比Q21 分钟前
Linux部署基于Django的博客系统
linux·运维·django
ASUJY42 分钟前
文件系统原理(基于Linux0.11)
linux·文件系统·linux0.11
喵个咪1 小时前
Qt 6 实战:C++ 调用 QML 回调方法(异步场景完整实现)
前端·c++·qt
边疆.1 小时前
【Linux】进程创建、进程终止、进程等待和进程程序替换
linux·运维·服务器·vim·进程控制·进程等待·进程替换
梦想的颜色1 小时前
阿里云ecs云服务器linux安装redis
linux·服务器·阿里云
Y淑滢潇潇2 小时前
RHCE Day5 SELinux
linux·运维·rhce
optimistic_chen2 小时前
【Linux 系列】Linux 命令/快捷键详解
linux·运维·服务器·ubuntu·命令行·快捷键
ICT技术最前线2 小时前
如何高效测试Linux系统连通性?
linux·网络·智能路由器
浅笑离愁12343 小时前
VI视频输入模块学习
linux·音视频