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;

相关推荐
大哥您好7 小时前
QEMU 11.1.2 多架构编译指南(x86_64 / aarch64 / riscv64)
linux·服务器
道满科技8 小时前
Function Calling 参数总出错?只修参数就行
linux·windows·python
一拳一个呆瓜8 小时前
【STL】文件系统导航
c++·stl
All for pursuit.9 小时前
【动态规划-21】312.戳气球
数据结构·c++·算法·leetcode·动态规划
Android系统攻城狮9 小时前
Linux Gstreamer深度解析之gst_audio_ring_buffer_prepare_read调用流程与实战(七十四)
linux·运维·服务器·gstreamer音视频·音视频进阶
栈帧之外9 小时前
【C++】STL之set
开发语言·c++
我科绝伦(Huanhuan Zhou)9 小时前
Linux 通用压力测试脚本合集:磁盘 + 网络
linux·网络·压力测试
zhanghaha131410 小时前
C++构造函数的一些其他应用(逐词逐句保姆讲解)
c++
jimy111 小时前
c++的 Type Traits (二、更详细版本)
开发语言·c++
Soneswy11 小时前
Linux系统篇--重定向与文件操作命令
linux