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;

相关推荐
chicheese2 小时前
Linux 面试速查表:从初级到高级,附高频场景答题模板
linux·运维
Linux-lucky2 小时前
32-38-Linux学习之旅之MySQL综合
linux·运维·学习·mysql·ubuntu
vortex53 小时前
常用终端模拟器全面对比:Kitty、WezTerm、Ghostty 与 Konsole
linux
知识分享小能手3 小时前
C++ 学习教程,从入门到精通,C++ 入门知识 — 完整知识点(1)
开发语言·c++·学习
qq_199886874 小时前
第8板块·第2节:统一内存的高级特性与性能调优
c++·人工智能·gpu算力·cuda
INGNIGHT4 小时前
270 · 电话号码的字母组合II(Trie)
linux·算法
zly35004 小时前
VMware Converter Standalone 物理机转化为虚拟机后源1硬盘变成了2个硬盘(2个硬盘文件)虚拟机无法启动。
linux·运维·服务器
2401_839080545 小时前
C++常见八股
数据结构·c++·算法
qq_199886875 小时前
第6板块 第2节 CUDA运行时API与驱动API 核心笔记
c++·人工智能·gpu算力
syagain_zsx6 小时前
算法基础篇 · 03 枚举(C++ 题解)
c++·算法·二进制·枚举