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;

相关推荐
AbandonForce2 分钟前
C++ STL list容器模拟实现
开发语言·c++·list
来鸟 鸣间2 分钟前
mutex_lock 流程
linux·c语言
秋风&萧瑟2 分钟前
【Linux系统编程】system函数和exec函数族的使用
linux·运维·服务器
秋风&萧瑟7 分钟前
【Linux系统编程】Linux多进程介绍及使用
linux·运维·网络
Tanecious.8 分钟前
蓝桥杯备赛:Day7- U535982 C-小梦的AB交换
c语言·c++·蓝桥杯
三万棵雪松9 分钟前
【Linux 物联网网关主控系统-Web部分(四)】
linux·前端·物联网·嵌入式linux
宵时待雨10 分钟前
linux笔记归纳1:linux初识
linux·运维·笔记
Deitymoon11 分钟前
linux——线程设置分离属性
linux
|_⊙12 分钟前
Linux进程(上)
linux·运维·服务器
feng_you_ying_li12 分钟前
linux之git/gdb的使用与介绍
linux