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;

相关推荐
wbcuc20 分钟前
ffmpeg工具把m4s合并为mp4 powershell脚本
ffmpeg·m4s
雾沉川1 小时前
Visual C++ 运行库合集 v105.0 部署与故障排查技术指南
开发语言·c++·dll
丘山望岳1 小时前
剑起霜华——平衡二叉树(AVL树 )精讲
开发语言·数据结构·c++
宇晨T1 小时前
BurpSuite实战:WackoPicko敏感目录探测
linux·运维·服务器
Boom_Shu1 小时前
浅拷贝与深拷贝
开发语言·c++·算法
Mortalbreeze1 小时前
C++ Lambda表达式详解:从捕获列表到底层原理
开发语言·c++
为何创造硅基生物1 小时前
LVGL
c++·ui
只做人间不老仙2 小时前
C++ grpc 拦截器示例学习
开发语言·c++·学习
月巴月巴白勺合鸟月半2 小时前
在Linux下开发桌面程序
linux·运维·服务器
zh路西法2 小时前
【tmux入门】终端分屏、SSH远程守护与一键启动脚本
linux·运维·ssh·bash