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;

相关推荐
铅笔小新z几秒前
【Linux】进程(中)
linux·运维·服务器
云栖梦泽1 分钟前
Linux内核与驱动:11.设备树
linux·c++
白毛大侠2 分钟前
Linux 常用命令速查手册
linux·运维·服务器
艾莉丝努力练剑4 分钟前
【Linux线程】Linux系统多线程(五):<线程同步与互斥>线程互斥
linux·运维·服务器·c语言·c++·学习·ubuntu
kyle~7 分钟前
FANUC机械臂---R寄存器
开发语言·c++·机器人·fanuc
weixin_457260507 分钟前
Linux 命令精讲(博客案例)
linux·运维·服务器
听风lighting8 分钟前
RTT-SMART学习 (二):启动过程
linux·c·rtt·rtos·rtt-smart
Elendill13 分钟前
【Ubuntu】Mihomo 安装、systemd 托管、TUN 配置、API 测速与切换节点
linux·运维·ubuntu
姜太小白13 分钟前
【Linux】CentOS 7 XRDP 远程桌面配置
linux·运维·centos
kyle~17 分钟前
字节序---大端与小端
c++·机器人