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;

相关推荐
泽020213 小时前
LLMChat ----- 通过C++语言调用大语言模型所实现的聊天系统
开发语言·c++·语言模型
弹简特13 小时前
【Linux命令饲养指南】Ubuntu 安装 MySQL【AI辅助实现】
linux·mysql·ubuntu
steem_ding14 小时前
C++ 回调函数详解
开发语言·c++·算法
会编程的土豆14 小时前
字符串知识(LCS,LIS)区分总结归纳
开发语言·数据结构·c++·算法
ITKEY_14 小时前
linux edge 强制使用x11运行
linux·运维·edge
鹏大师运维14 小时前
重磅更新!统信桌面操作系统V25专业版安装使用教程
linux·安装教程·国产化·统信uos·专业版·桌面操作系统·v25
zjneymar14 小时前
苍穹外卖中一些知识点和问题
java·linux·服务器
天若有情67314 小时前
原创C++设计模式:功能归一化——无继承、轻量版AOP,比传统OOP更优雅
开发语言·c++·设计模式·oop
重生的黑客14 小时前
Linux:Makefile 自动化构建与进度条实战
linux·运维·自动化
发发就是发14 小时前
资源管理:I/O端口与内存映射
linux·服务器·驱动开发·单片机·嵌入式硬件·fpga开发