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;

相关推荐
小小bugbug27 分钟前
带工作窃取的线程池
c++·线程池
无奈笑天下33 分钟前
银河麒麟桌面操作系统上磁盘无法自动挂载问题处理
linux·运维·服务器
木头左1 小时前
【Linux运维】服务器磁盘清理与Docker日志治理实战:一次巡检释放70G空间
linux·docker·磁盘清理·日志治理
星恒随风2 小时前
MySQL 从零入门(七):索引原理与 B+ 树详解——从磁盘 I/O 到 InnoDB 聚簇索引
linux·服务器·数据库·笔记·mysql
多弗朗皮卡丘15 小时前
网络基础:数据链路层与其他协议或技术
linux·网络·tcp/ip
南风841117 小时前
C++ 四种强制类型转换详解
c++
微笑星河q18 小时前
C++STL【vector】常用接口函数使用和迭代器失效问题
开发语言·c++
HaiXCoder21 小时前
C++ 表达式怎么读:从一行代码到类型、值类别和生命周期
c++
dingdingfish21 小时前
TLPI 第52章 读书笔记:POSIX Message Queues
linux·mq·ipc·posix·message·tlpi