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;

相关推荐
chao_66666611 分钟前
AI coding 代码开发规范
linux·运维·服务器
xiaobangsky26 分钟前
Linux SMB/CIFS 网络挂载配置指南
linux·运维·网络
2301_8035545226 分钟前
C++ 并发核心:std::promise、std::future、std::async 超详细全解
开发语言·c++
wang090728 分钟前
Linux性能优化之内存管理基础知识
java·linux·性能优化
杰 .32 分钟前
闲暇时刻对LinuxOS的部分理解(一)
linux·服务器
EverestVIP34 分钟前
C++ 成员函数的指针
c++
俺不要写代码37 分钟前
线程启动、结束,创建线程多法、join,detach,线程的移动语义
服务器·开发语言·网络·c++
摩斯电码43 分钟前
深入 perf 第二版(二):用原始事件编号解锁 CPU 的隐藏指标
linux·性能优化
代码中介商1 小时前
Linux 基础命令完全指南:从文件操作到进程管理
linux·运维·服务器
思麟呀1 小时前
应用层协议HTTP
linux·服务器·网络·c++·网络协议·http