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;

相关推荐
东城居士4 小时前
Linux驱动阻塞与非阻塞访问的理解
linux·嵌入式系统
..Dauntless..5 小时前
【Linux】进程地址空间初步理解
linux·运维·服务器
可乐鸡翅yeah_5 小时前
网页端 M3U8 播放器性能监控,怎么看播放卡顿指标
javascript·ffmpeg·音视频·safari·m3u8
Julien20045 小时前
Docker 网络(一)
linux·运维·服务器·ssh·学习方法
ShineWinsu5 小时前
对于Redis:string类型的解析
java·c++·redis·分布式·缓存·面试·string
杨云龙UP5 小时前
一次数据库查询缓慢故障复盘:大表数据增长、SQL全表扫描导致系统响应异常
linux·运维·服务器·数据库·sql·mysql
YYYing.6 小时前
【设计模式系列 (七) 】桥接模式
c++·后端·设计模式·桥接模式
PellyKoo6 小时前
【linux运维】ubuntu+samba 用户组独占目录权限配置踩坑记
linux·运维·ubuntu
AR-26710-6 小时前
Linux Day15——系统管理复习
linux·运维
高山有多高7 小时前
【Linux笔记】Linux自定义Shell
linux·c++