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;

相关推荐
fengyehongWorld21 分钟前
Linux update-alternatives命令
linux
雨的旋律209929 分钟前
ubuntu2604
linux·运维·服务器
王维同学1 小时前
Credential Provider、Filter 与 PLAP 的 CLSID 枚举
c++·windows·安全·注册表
三言老师1 小时前
mkdir创建多级目录,目录创建基础实操
linux·运维·服务器
Carlgood-Minecraft2 小时前
随机分位系统破解版 (BPS)Version-B4.2
c++
imc.112 小时前
linux EXT文件系统
linux·运维·服务器
paeamecium3 小时前
【PAT甲级真题】- Kuchiguse (20)
数据结构·c++·python·算法·pat考试·pat
三言老师3 小时前
mv移动文件、重命名文件实战案例
linux·服务器·网络·centos
txzrxz4 小时前
拓补排序讲解
c++·算法·图论·排序
AOwhisky4 小时前
云原生 DevOps 工具链从入门到实战(第二期)——Jenkins安装与基础配置——CICD核心引擎
linux·运维·ci/cd·云原生·jenkins·devops