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;

相关推荐
biter down13 分钟前
2:Ubuntu 22.04 LTS 的完整下载教程
linux·运维·ubuntu
零陵上将军_xdr14 分钟前
为什么DCL单例要加volatile?——CPU乱序执行与内存屏障
java·linux
杨云龙UP14 分钟前
Oracle/ODA RAC /u01 空间告警处理指南:grid 用户监听日志清理_2026-06-15
linux·数据库·oracle·oracle linux·oda·监听日志·在线清理
思麟呀23 分钟前
C++14概述与三大核心语法改进
开发语言·c++
Lhan.zzZ35 分钟前
Qt Quick 嵌套 Dialog 与 ComboBox 层级混乱问题解决
c++·qt
Irissgwe42 分钟前
AVL树详解
数据结构·c++·算法·二叉树·c·二叉搜索树·avl
剑锋所指,所向披靡!1 小时前
进程间通信IPC
c++
小小晓.1 小时前
零基础C++小白突破
开发语言·c++
阿i索1 小时前
【C++学习笔记】【基础】4.string类(2)——模拟实现
c++·笔记·学习
赋缘汇(fableshare)-黄从庆1 小时前
Ubuntu重启后进入initramfs导致无法开机
linux·运维·ubuntu