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;

相关推荐
mengge.cloud13 分钟前
LVS 小白完整教程(Linux虚拟服务器负载均衡)
linux·运维·服务器·负载均衡·lvs
秦渝兴17 分钟前
LVS-DR 高可用集群实战:NFS + Web + DNS + Keepalived 全套架构
linux·服务器·网络·lvs
skr爱码士22 分钟前
05_Qt 核心模块概览——Qt Core、Gui、Widgets、Quick 的职责划分
c++·qt·系统架构·客户端
搬砖的小码农_Sky34 分钟前
LANDrop 在 Ubuntu 上的安装方法
linux·运维·计算机网络·ubuntu
raindayinrain39 分钟前
深入理解Linux内核--内存架构,页框分配器,性能优化
linux·numa·水位·区域·页框分配
Mortalbreeze1 小时前
深入理解 TCP 协议(二):TCP 可靠传输与高效通信机制详解
linux·服务器·网络·网络协议·tcp/ip
sel_91 小时前
【Linux】Linux 常用命令手册
linux·服务器
郝学胜-神的一滴1 小时前
Horse3D 游戏引擎研发笔记(七):Clydesdale——从流式日志到多输出订阅
c++·qt·unity·游戏引擎·图形渲染·unreal engine·opengl
2401_868534781 小时前
企业信息安全建设
linux·网络协议·beautifulsoup
goyeer1 小时前
Liunx日志管理与journalctl
java·linux·运维·服务器·运维开发·信息化·信息化企业管理