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;

相关推荐
字节高级特工2 分钟前
【C++】”如虎添翼“:模板初阶
java·c语言·前端·javascript·c++·学习·算法
.Vcoistnt4 分钟前
Codeforces Round 1024 (Div. 2)(A-D)
数据结构·c++·算法·贪心算法·动态规划·图论
进取星辰19 分钟前
24、TypeScript:预言家之书——React 19 类型系统
linux·运维·ubuntu
月上柳青20 分钟前
linux-驱动开发之设备树详解(RK平台为例)
linux·驱动开发·dsp开发
越甲八千30 分钟前
MFC listctrl修改背景颜色
c++·mfc
炯哈哈32 分钟前
【上位机——MFC】序列化机制
开发语言·c++·mfc·上位机
隐世138 分钟前
C++多态讲解
开发语言·c++
Wooden-Flute39 分钟前
十四、继承与组合(Inheritance & Composition)
c++
阳区欠1 小时前
【Linux】线程的同步与互斥
linux·服务器·c++·线程同步·线程互斥·生产者/消费者模型
WG_171 小时前
Linux:43线程封装与互斥lesson31
linux·运维·服务器