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;

相关推荐
等我调个Bug2 分钟前
C++智能指针通俗讲解
开发语言·c++
承渊政道10 分钟前
Linux网络学习【传输层协议UDP】
linux·网络·网络协议·学习·ubuntu·udp
雯宝13 分钟前
usb_serial_init/tty_driver/alloc_tty_driver/tty_register_driver/usb_register
linux
澜山奕秋33 分钟前
Rhcsa 二
linux·运维·服务器
小此方33 分钟前
Linux网络(三十三):告别O(n)噩梦:从select/poll的挣扎到epoll红黑树+回调的降维打击,一文打通IO多路复用
linux·网络·驱动开发
2301_7779983437 分钟前
Linux 网络:数据链路层
linux·服务器·网络
迷途之人不知返39 分钟前
【文件系统】-1-磁盘与扇区的定位方法
linux
无足鸟ICT41 分钟前
【RHCA+】yum源配置(软件仓库)
linux·运维
0+1111 小时前
Linux --IP分片和组装
linux·网络·tcp/ip
Kira Skyler1 小时前
CVE-2026-99999 deferred-metadata trust inversion 原理分析.md
linux