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;

相关推荐
可爱又迷人的反派角色“yang”7 小时前
ansible剧本编写(三)
linux·网络·云计算·ansible
石像鬼₧魂石12 小时前
内网渗透靶场实操清单(基于 Vulhub+Metasploitable 2)
linux·windows·学习·ubuntu
橘子真甜~13 小时前
C/C++ Linux网络编程15 - 网络层IP协议
linux·网络·c++·网络协议·tcp/ip·计算机网络·网络层
拾贰_C14 小时前
【Linux | Windows | Terminal Command】 Linux---grep | Windows--- findstr
linux·运维·服务器
asiwxy15 小时前
OpenGL 材质
c++
阿华hhh15 小时前
Linux系统编程(标准io)
linux·开发语言·c++
石像鬼₧魂石15 小时前
Kali Linux 网络端口深度扫描
linux·运维·网络
alengan15 小时前
linux上面写python3日志服务器
linux·运维·服务器
程序喵大人16 小时前
推荐个 C++ 练习平台
开发语言·c++·工具推荐
Rose sait16 小时前
【环境配置】Linux配置虚拟环境pytorch
linux·人工智能·python