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;

相关推荐
cpp_25018 分钟前
P2347 [NOIP 1996 提高组] 砝码称重
数据结构·c++·算法·题解·洛谷·noip·背包dp
Hugh-Yu-13012312 分钟前
二元一次方程组求解器c++代码
开发语言·c++·算法
LXY_BUAA15 分钟前
《ubuntu22.04》_新系统的配置_20260418
linux·运维·服务器
楼田莉子19 分钟前
同步/异步日志系统:日志落地模块\日志器模块\异步日志模块
linux·服务器·c++·学习·设计模式
文祐19 分钟前
C++类之虚函数表及其内存布局
开发语言·c++
小狄同学呀27 分钟前
同样的global,不同的audioLibPath——记一次诡异的内存错位
c++·windows
编程大师哥36 分钟前
C++类和对象
开发语言·c++·算法
洛水水1 小时前
图解式讲解内存池:告别内存碎片与随机coredump
linux·内存池
小驴程序源1 小时前
TS 分片合并完整教程
python·ffmpeg
Rabitebla1 小时前
C++ 和 C 语言实现 Stack 对比
c语言·数据结构·c++·算法·排序算法