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;

相关推荐
2601_949847751 小时前
bcrypt.js 跨端三方库仓颉适配全流程
linux·运维·ubuntu
m0_639906941 小时前
Linux 操作系统入门:目录结构、服务排查常用命令、Shell 脚本基础
linux·运维·后端
水饺编程3 小时前
第2章:Linux 基础,exit 命令
linux·c语言·汇编
木子欢儿3 小时前
Debian 13 + vsftpd 搭建FTP服务
linux·服务器·前端·网络·debian
CodeYp20194 小时前
第15讲:二叉搜索树
开发语言·c++·二叉搜索树
pipixia200334 小时前
C++继承面试四连问:内存叠加、私有继承、sizeof、权限重映射
c++·面试·嵌入式·继承·面向对象·对象模型
GeW5 小时前
新质生产力落地实践:企业级Linux迁移与数据库国产化
linux
雯宝5 小时前
usb_serial_generic_register
linux
疯狂的Meng5 小时前
我把第一周的 Linux 命令整理成了自己的手册(附 7 个我踩的坑)
linux
wt95275 小时前
VMware 虚拟机静态 IP 配置
linux