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;

相关推荐
倒头就睡的小比特6 小时前
算法竞赛C++常用的STL
c++·算法
weilx12346 小时前
C++笔记-文件IO-<fcntl.h>
c++
未济6 小时前
linux 配置环境变量
linux
傲世仙尊6 小时前
目录即文件-Ext文件系统收尾篇
linux·c语言
Smileyqp沛沛8 小时前
前端?C++ ?较大差异基础罗列
c++·基础·前端转c++
C语言小火车8 小时前
C/C++ 为什么需要编译器?
开发语言·c++
_艾伦 耶格尔.8 小时前
进程间通信
linux
旖旎夜光9 小时前
力控面试题 01.01: 判定字符是否唯一(位运算) —— 题解
c++·学习·算法·leetcode·力控
Liuqy-059 小时前
Linux IO编程——静态库、动态库
linux
吞下星星的少年·-·9 小时前
C++ 萌新语法入门篇
c++·算法比赛