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;

相关推荐
17(无规则自律)3 小时前
【CSAPP 读书笔记】第一章:计算机系统漫游
linux·c语言·arm开发·嵌入式硬件·学习·ubuntu
天才奇男子3 小时前
LVS原理及部署
linux·运维·云原生·wpf·lvs·linux chrony
梁洪飞3 小时前
内核启动卡死在Starting kernel ...,没有任何打印如何定位
linux·arm开发·嵌入式硬件·arm
321.。3 小时前
深入理解 Linux 线程封装:从 pthread 到 C++ 面向对象实现
linux·开发语言·c++
EmbedLinX3 小时前
Linux内核之文件系统:从VFS到实际存储的运作机制
linux·服务器·c语言·c++
实心儿儿3 小时前
Linux —— 进程概念 - 初识进程
linux·运维·服务器
weixin_462446233 小时前
Linux/Mac 一键自动配置 JAVA_HOME 环境变量(含 JDK 完整性校验)
java·linux·macos
济6173 小时前
linux 系统移植(第十六期)---Linux 内核移植(5)-- 修改网络驱动(1)--- Ubuntu20.04
linux·嵌入式硬件
雾削木4 小时前
STM32 HAL库 BMP280气压计读取
linux·stm32·单片机·嵌入式硬件
峥嵘life4 小时前
Android16 EDLA【CTS】CtsNetTestCases存在fail项
android·java·linux·学习·elasticsearch