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;

相关推荐
LRL_6 小时前
【实战指南】Node.js 跨平台依赖下载:如何在 Windows/Linux 环境下互跨下载目标系统的 npm/pnpm 包
linux·windows·node.js
hetao17338376 小时前
2026-10-01~02 hetao1733837 的刷题记录
c++·算法
高山有多高6 小时前
【Linux笔记】网络命令
linux
郝学胜-神的一滴6 小时前
AI 编程智能体 03:拆解当下主流智能体能力
开发语言·c++·人工智能·python·程序人生·游戏
一条破秋裤6 小时前
Linux 线程同步:读写锁
java·linux·jvm
工作10年+,存储芯片行业7 小时前
Linux NVMe 中断排查与性能优化:IRQ 优化(原理+排查)
linux·运维·性能优化·ssd·nvme·pcie·中断
宵时待雨7 小时前
linux笔记归纳25:多路转接epoll
linux·服务器·网络·c++
Frank_refuel8 小时前
【C++项目】手撕JRpc框架(单机怎么优化到分布式思想)
开发语言·c++
geats人山人海8 小时前
linux 1.目录结构
linux·运维·服务器
ShineWinsu8 小时前
对于Redis:Hash类型的解析
c++·redis·分布式·缓存·面试·hash·哈希表