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;

相关推荐
胜心缘2 小时前
openEuler 24.03 最小安装后的第一个小时:10 组命令,一份基线清单
linux·运维
胜心缘2 小时前
openEuler 装 nginx:别再开 EPOL 了,它根本不在里面
linux·运维
用户8174480063393 小时前
从零搭建并加固个人博客:阿里云轻量服务器 + Hexo + Nginx 全流程实战
linux
用户3900341061483 小时前
new 到底做了什么:operator new、malloc、delete[] 的完整调用链
c++
老一岁4 小时前
Redis事务_锁_持久化_主从哨兵
linux·数据库·redis
梓沂4 小时前
零成本替代 FTP:Ubuntu 24.04 搭建 Samba 共享,实现“一人可写,多人只读”
linux·运维·ubuntu
EmbeddedChen4 小时前
Linux 定时任务怎么设置?用 cron 自动执行脚本
linux·crontab·cron
wuminyu5 小时前
OpenJDK学习笔记:Native事件队列与Java回调背压
java·linux·c语言·jvm·c++
Techblog of HaoWANG5 小时前
具身智能机器人专题(4) Docker 实战
linux·运维·ubuntu·docker·容器·机器人·ollama
DeskUI~~6 小时前
8.4M,我把 Linux 变成了一块“磁盘”
linux·运维·服务器