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;

相关推荐
zfxwasaboy11 小时前
DRM KMS 子系统(4)Planes/Encoder/Connector
linux·c语言
暮色_年华12 小时前
随想 2:对比 linux内核侵入式链表和 STL 非侵入链表
linux·c++·链表
dnncool12 小时前
【Linux】操作系统发展
linux
文言一心12 小时前
LINUX离线升级 Python 至 3.11.9 操作手册
linux·运维·python
w-w0w-w13 小时前
C++模板参数与特化全解析
开发语言·c++
XRJ040618xrj13 小时前
如何在Linux中根据物理网卡建立虚拟网卡
linux·服务器·网络
大锦终13 小时前
递归回溯综合练习
c++·算法·深度优先
码农水水14 小时前
蚂蚁Java面试被问:混沌工程在分布式系统中的应用
java·linux·开发语言·面试·职场和发展·php
晚风吹长发14 小时前
初步了解Linux中的动静态库及其制作和使用
linux·运维·服务器·数据结构·c++·后端·算法