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;

相关推荐
ALex_zry1 小时前
C++ ORM与数据库访问层设计:Repository模式实战
开发语言·数据库·c++
浅念-5 小时前
Linux 开发环境与工具链
linux·运维·服务器·数据结构·c++·经验分享
旺仔.2916 小时前
容器适配器:stack栈 、queue队列、priority queue优先级队列、bitset位图 详解
c++
刘景贤7 小时前
C/C++开发环境
开发语言·c++
似水এ᭄往昔7 小时前
【Linux】gdb的使用
linux·运维·服务器
tian_jiangnan8 小时前
grafana白皮书
linux·服务器·grafana
mizuhokaga8 小时前
Linux内网集群基于Docker 安装 Chat2DB
linux·运维·docker
OasisPioneer8 小时前
现代 C++ 全栈教程 - Modern-CPP-Full-Stack-Tutorial
开发语言·c++·开源·github
liulilittle9 小时前
XDP to TC : TUN eBPF NAT
c++
花开莫与流年错_9 小时前
ZeroMQ基本示例使用
c++·消息队列·mq·示例·zeromq