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;

相关推荐
..Dauntless..13 分钟前
【Linux】一切皆文件和缓冲区
linux·运维·服务器
QMCY_jason22 分钟前
x86 ubuntu2204 无gui 安装 openeuler 2203 aarch64版本
linux·运维·服务器
重生之小比特26 分钟前
【Linux系统】12 进程程序替换 自定义Shell 命令行解释器
linux·运维·服务器
weixin_3077791336 分钟前
C++代码实现MATLAB中的fitrtree函数功能
开发语言·c++·算法·matlab
AI wins40 分钟前
c++新增頭文件
c++
Shadow(⊙o⊙)1 小时前
仿muduo实现高并发服务器——事件就绪管理Channel.hpp
服务器·c++
あ-1 小时前
CubeSandBox配置CubeMaster CPU 超分
linux·运维·服务器
Escalating_xu1 小时前
【Linux 网络编程】TCP Socket 编程(上):从 listen、accept 到完整回显通信
linux·网络·tcp/ip
by209991 小时前
哈希表——快速找到数据:冲突、删除与扩容的实现
数据结构·c++·哈希算法·散列表
老秦包你会1 小时前
Linux第十课---------Linux信号
linux