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;

相关推荐
橘颂TA42 分钟前
【Linux】读写锁
大数据·linux·开发语言·c++·读写锁
Strange_Head43 分钟前
补充知识点`makefile`、`config`、`GLP协议` 1/3 ——《驱动篇》
linux·嵌入式硬件
霍田煜熙1 小时前
HuoTian的两赛vlog(游记)~(2026.04.26写)
c++·奥数·双赛·vlog
learning-striving1 小时前
VMware Workstation中centso下载安装
linux·vmware·虚拟机
CoderCodingNo1 小时前
【CSP】CSP-J 2019 江西真题 | 次大值 luogu-P5682 (适合GESP四、五级及以上考生练习)
开发语言·c++·算法
极客智造1 小时前
深度详解 C++ 类型转换:隐式转换、C 风格强转、C++ 四大标准转换
c++·类型转换
薛定谔的悦2 小时前
光伏逆变器多协议接入——Modbus RTU 在新能源设备集成中的实践
linux·运维·服务器·bms
bksczm2 小时前
Linux之基础开发工具(Ubuntu)之编译器
linux·运维·服务器
Jun6263 小时前
【RV1103】AD4115实现8通道ADC采样,MQTT数据传输,1K采样率
linux·python
嵌入式×边缘AI:打怪升级日志3 小时前
DS18B20 Linux 驱动开发实战:从时序图到温度读取的保姆级教学
linux·驱动开发