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;

相关推荐
我是码代码1 小时前
高分辨率ADC布局详解:走线压降、回流路径与地平面处理
linux·c语言·嵌入式
瑞雪兆丰年兮1 小时前
Linux快速入门 第四章 Linux系统常用操作技巧
linux·运维·服务器
星恒随风1 小时前
从0实现C++ AI大模型接入SDK(四):大模型API接入、公共数据结构设计与日志库封装
linux·服务器·数据结构·c++·人工智能
炸膛坦客1 小时前
单片机/C/C++八股:(三十四)C 语言函数参数入栈顺序
c语言·开发语言·c++
时间的拾荒人2 小时前
Linux进程间通信(上篇):匿名管道 +进程池(基于匿名管道实现)
linux·服务器·管道
码途行者2 小时前
每天10分钟学Go:第20课 泛型
c++·算法·golang
无足鸟ICT3 小时前
【RHCA+】介绍proc
linux·运维·服务器
学以智用3 小时前
Linux 终端(Terminal)
linux
AIgorithmGEEK4 小时前
算法·哈希表|从“逐个比”到“按 key 算位置”
数据结构·c++·算法·leetcode·hash
weiwei228445 小时前
Nuclei开发环境搭建及入门
linux·嵌入式·risc-v