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;

相关推荐
2301_801184751 小时前
linux系统注意知识
linux·运维·服务器
盗理者3 小时前
麒麟 V10 上把 MCP Server 挂到 Nginx 后面:421 与流式断流的排查
linux·网络·nginx·信创·mcp
fqbqrr3 小时前
2612,现代cmake
c++·cmake
我要见SA姐14 小时前
用生活化类比当钥匙,一键打开 C++ 入门大门
java·开发语言·c++
船神丿男人5 小时前
C++ 背包动态规划六题:看懂倒序、正序和两层循环
c++·动态规划
郝学胜-神的一滴6 小时前
Effective STL 条款 17:用 swap 技巧去掉多余容量
c语言·开发语言·数据结构·c++·算法·rpc
EmbeddedChen6 小时前
Linux Shell 脚本入门:写一个自动备份文件的小工具
linux·bash·shell
随流寻影7 小时前
利用 C++ 实现快速排序及三种优化
开发语言·c++
西西弗Sisyphus8 小时前
C++ 最小 Agentic Loop 实现 - 回调函数系列 - 指针与内存地址(2)
开发语言·c++
开开心心就好9 小时前
定时结束进程的小工具,到点还能关机
linux·运维·服务器·智能手机·pdf·电脑·word