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;

相关推荐
前端世界9 分钟前
Linux 防火墙实战:用 firewalld 配置 External/Internal 区域,实现 NAT 内网共享上网
linux·服务器·网络
Dream it possible!21 分钟前
LeetCode 面试经典 150_链表_旋转链表(64_61_C++_中等)
c++·leetcode·链表·面试
陌路201 小时前
操作系统(6)虚拟内存-缓存工具-页表(2)
linux
林一百二十八1 小时前
Win11配置VMware-workstation以及Ubuntu环境
linux·运维·ubuntu
铜豌豆_Y2 小时前
嵌入式Linux驱动开发之I2C子系统(3)--I2C子系统框架
linux·运维·驱动开发
LNN20222 小时前
Qt creator +Valgrind检测内存泄漏(linux)
linux·开发语言·qt
0wioiw02 小时前
Ubuntu(④Mysql)
linux·mysql·ubuntu
球求了2 小时前
Linux 系统入门:环境变量&&虚拟地址空间
linux·运维·服务器·1024程序员节
CS创新实验室3 小时前
典型算法题解:长度最小的子数组
数据结构·c++·算法·考研408
我有一些感想……3 小时前
浅谈 BSGS(Baby-Step Giant-Step 大步小步)算法
c++·算法·数论·离散对数·bsgs