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;

相关推荐
盐焗鹌鹑蛋8 小时前
【C++】继承
开发语言·c++
会周易的程序员9 小时前
使用 pybind11 封装 C++ 日志库 microLog 为 Python 模块
java·c++·python·物联网·架构·日志·aiot
做个文艺程序员9 小时前
Linux第12篇:性能监控与瓶颈分析——CPU/内存/IO/网络全维度
linux·运维·网络
WZF-Sang9 小时前
网络基础——2
服务器·网络·c++·学习·网络编程·php
HAPPY酷9 小时前
【ROS2】 Conda 环境搭建(命令行版)
linux·运维·python·ubuntu·机器人·conda
-西门吹雪11 小时前
现代C++ 并发编程-学习指南
java·jvm·c++
hai31524754311 小时前
九章空间几何对照直译法:通用芯片 / 定制专用芯片 编译适配规则
linux·汇编·bash
ton_tom11 小时前
设备驱动程序编程-Linux2.6.10-kdb安装-32位
linux·运维·服务器
dddwjzx11 小时前
嵌入式Linux C应用编程入门——进程 ( 二 )
linux·嵌入式
坐望云起12 小时前
FFmpeg.wasm 纯浏览器端视频压缩与格式转换实战:零服务器、零上传、100% 隐私
服务器·ffmpeg·wasm