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;

相关推荐
jimy11 小时前
readelf 查看“派生类”的vtable符号
开发语言·c++
DYWorker0011 小时前
Linux驱动子系统:DMA-Buf —— Consumer和Provider(008)
linux·驱动开发
蒸蒸yyyyzwd2 小时前
cpp 选手秋招学习笔记 day37 面经学习
c++·八股
YYYing.2 小时前
【C++进阶系列 (七)】C++ RTTI 深度剖析:从 typeid 到 dynamic_cast 的底层之旅
开发语言·c++·c/c++·rtti
雯宝2 小时前
Linux 内核函数集
linux
GeW3 小时前
从挂科到高分通过:RHCE快速拿证的10个提分技巧
linux
钓鱼的肝3 小时前
csp-j-s总结(2)
c++·经验分享·笔记·算法·青少年编程
重生的黑客3 小时前
Qt 常用控件精讲(1):QWidget 核心属性全解 —— 从 geometry 到 qrc 与 QSS
c++·qt·qwidget·qss·常用控件
鸠摩智首席音效师3 小时前
Linux /etc/nsswitch.conf 文件有什么作用 ?
linux
东城居士4 小时前
理解pinctrl和gpio子系统驱动
linux·嵌入式系统