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;

相关推荐
天空'之城8 小时前
Linux 系统编程 22:五种 IO 模型全解
linux
小张成长计划..9 小时前
【Linux】10:冯·诺依曼体系结构和操作系统
linux·运维·服务器
从零开始的代码生活_12 小时前
C++ 内存管理:从内存分区到 new/delete 底层原理
开发语言·c++·后端
悦儿遥遥雨112 小时前
PXE + Kickstart 无人值守批量部署系统
linux·javascript·nginx
Imagine Miracle13 小时前
【WSL】让WSL2后台持久运行不自动关闭的解决方案
linux·windows·wsl
aaPIXa62213 小时前
C++ 用 13 条规则让模型写出安全现代 C++
java·c++·安全
兔C13 小时前
Linux 命令行入门学习资料 day_2
linux·运维·服务器
eggcode14 小时前
Linux命令基础与操作技巧
linux
二宝哥14 小时前
VMware Workstation 实战:CentOS 7.9 安装、桥接网络配置与克隆管理详解
linux·centos·vmware
枕星而眠14 小时前
【数据结构】红黑树入门指南
运维·数据结构·c++·后端