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;

相关推荐
kidwjb6 小时前
信号量在进程中的使用
linux·进程间通信
C+++Python6 小时前
C++ 进阶学习完整指南
java·c++·学习
sparEE7 小时前
c++值类别、右值引用和移动语义
开发语言·c++
sulikey7 小时前
个人Linux操作系统学习笔记2 - gcc与库的理解
linux·笔记·学习·操作系统·gcc·
jrrz08287 小时前
Apollo MPC Controller
c++·自动驾驶·apollo·mpc·横向控制·lateral control
二宝哥8 小时前
Linux虚拟机网络配置
linux·运维·服务器
陳10308 小时前
Linux:进程间通信 和 简单进程池
linux·运维·服务器
jimy18 小时前
改.bashrc,直观地判断本地repo是否有改动
linux·服务器
愚昧之山绝望之谷开悟之坡9 小时前
什么是Linter?什么是沙箱!
linux·笔记
babytiger9 小时前
Gitea 重安装 + Snap 数据迁移完整流程总结
linux·elasticsearch·gitea