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;

相关推荐
小小龙学IT12 小时前
C++ 并发编程深度解析:从内存模型到无锁数据结构
数据结构·c++
qeen8713 小时前
【Linux】指令补充与shell的简单介绍
linux·运维·服务器
凯瑟琳.奥古斯特13 小时前
力扣1013三等分解法与C++实现
开发语言·c++·算法·leetcode·职场和发展
一拳一个呆瓜13 小时前
【STL】iostream 编程:缓冲区的作用
c++·stl
阿成学长_Cain13 小时前
Linux talk 命令详解:经典终端实时聊天工具,无需图形界面即可对话
linux·运维·前端
我不是懒洋洋13 小时前
从零实现一个分布式任务调度器:XXL-JOB的核心设计
c++
一拳一个娘娘腔14 小时前
【后渗透-Linux篇】Linux 提权与逃逸:从 www-data到 root的蜕变
linux·运维·服务器
jieyucx14 小时前
零基础通关:Shell 编程核心语法全景详解
linux·运维·编程·shell
杨运交14 小时前
[045][Crypto模块]设计一个可扩展的加解密框架:策略模式与工厂模式实战
linux·运维·策略模式