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;

相关推荐
2401_8697695941 分钟前
linux 权限 指令与权限(重启之后)
linux
码农客栈1 小时前
Linux CAN 驱动
linux·驱动开发
汉克老师1 小时前
GESP2026年9月认证C++三级( 第三部分编程题(2、分割字符串))精讲
c++·gesp·小学生·学c++编程
估值探索者1 小时前
【Python量化系统工程化 #08】关了 SSH 就停?systemd 让脚本开机自启 + 异常自动拉起
java·c++·人工智能·分类·数据挖掘
天若有情6731 小时前
C++花式魔改!手写头文件复刻Java语法,彻底打破编码思维定式
java·c++·语言做语言·jac++
qq_199886872 小时前
第7板块·第3节:CUTLASS 的 GEMM 实现与优化策略
c++·人工智能·gpu算力·cuda
hetao17338372 小时前
2026-09-17 hetao1733837 的刷题记录
c++·算法
GeW2 小时前
红帽RHCE从挂科边缘到一次过,我做对了什么
linux
时空自由民.2 小时前
WSL解决USB 串口连接问题与linux串口权限问题
linux·单片机
OpenPomeloxCommunity3 小时前
Linux驱动基础(三):firmware的声明与加载
linux·操作系统