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;

相关推荐
郝学胜-神的一滴1 小时前
Effective STL 条款15:注意字符串实现上的差异
java·开发语言·数据结构·c++·算法·visualstudio
心之王者7162 小时前
【Linux】多线程:从线程控制、同步互斥到经典并发模型
linux·运维·服务器
Doctor_Strange_DML2 小时前
图像编辑模型服务部署过程记录
linux·缓存·docker·ai
星恒随风6 小时前
C++11 加餐(2)并发支持库——mutex、lock_guard、unique_lock 与死锁问题
开发语言·c++
AvocadoZeroOneOI6 小时前
Kadane 算法(最大子段和)
c++·学习·算法·动态规划
笔记本note7 小时前
Linux 文件系统与设备文件
linux·服务器·文件系统
无足鸟ICT7 小时前
【RHCA+】_proc_pid_cmdline
linux·运维·服务器
学以智用8 小时前
CentOS Linux 文件操作详解
linux
饿了吃洗衣凝珠9 小时前
shell循环
linux·运维·服务器
汉克老师9 小时前
GESP六级第二课:森林里的分叉城堡——二叉树的构造与存储
c++·二叉树·树·gesp·小学生·小学生学编程