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;

相关推荐
ShineWinsu15 小时前
对于Qt:QFormLayout常见属性以及方法的解析
开发语言·c++·qt·面试·客户端·表单·qformlayout
kyle~16 小时前
嵌入式 SoC 系统
linux·c++·嵌入式·计算系统
人生!?18 小时前
Linux 从入门到进阶 | 基础语法
linux·笔记·教程
心之王者71619 小时前
Linux 进程信号:从产生、阻塞到捕捉与子进程回收
linux·服务器·网络
爱写Bug的浮游19 小时前
C++移动构造真的比拷贝快吗
c++·性能优化
AndreaYYmm19 小时前
日志里 grep 到 Fail 就判失败?这六个假阳性我全踩过
linux·shell
Aaa西红柿鸡蛋20 小时前
网络协议分析实验:基于 UDP 广播模型的 C/S 通信设计与实现
c++
青少儿编程课堂20 小时前
蓝桥杯·全国青少年信息素养大赛·电子学会Python/C++考级:扫描线与线段树求矩形面积并解析
c++·python·算法·bfs·信息学竞赛
爱吃香菜的初学者20 小时前
二十五.Linux——epoll
linux·运维·服务器
少司府20 小时前
嵌入式外设篇(一)GPIO·一:认识GPIO
linux·单片机·嵌入式硬件·mcu·系统·rtos·嵌入式软件