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;

相关推荐
@三十一Y3 小时前
C++:AVL树实现
c++
小此方4 小时前
Linux网络(一):揭秘从网络发展哲学到 TCP/IP 协议栈分层设计的设计哲学
linux·网络·tcp/ip
星野爱8954 小时前
远程控制哪家安全性更高?ToDesk、UU远程、向日葵隐私屏深度测评!
linux·运维·网络
ALINX技术博客4 小时前
【黑金云课堂】FPGA技术教程Linux开发:系统定制
linux·运维·fpga开发
ShineWinsu4 小时前
对于Linux:传输层协议UDP原理的解析
linux·c++·面试·udp·协议·传输层·计算机系统
LingzhiPi4 小时前
零知派ESP32--AS5600磁吸旋钮音量控制器
c++·单片机·嵌入式硬件
小保CPP4 小时前
OpenCV C++车型识别1-图像预处理
c++·人工智能·opencv·计算机视觉
库克克5 小时前
【C++】C++11 包装器function 与 绑定器 bind
开发语言·c++
小小龙学IT5 小时前
C++ Placement New 与显式析构:手动对象生命周期管理的艺术
c++·windows·mfc
2601_965798475 小时前
How to Build a Custom Artisan Store on WordPress: Crafti Theme Review
linux·服务器·数据库