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;

相关推荐
Source.Liu18 小时前
【沟通协作软件】使用 Rufus 制作 Ubuntu 启动盘的详细过程
linux·ubuntu
Love丶伊卡洛斯18 小时前
Ubuntu 部署 STUN服务端
linux·运维·ubuntu
CC.GG18 小时前
【C++】用哈希表封装myunordered_map和 myunordered_set
java·c++·散列表
梁洪飞19 小时前
通过链接文件和Start.S学习armv7
linux·arm开发·嵌入式硬件·学习·arm
DN金猿19 小时前
使用ubuntu安装nginx时报错
linux·nginx·ubuntu
小赵还有头发19 小时前
安装Ceres与glog
linux·学习·无人机·ceres·glog
xiaoye-duck19 小时前
C++ string 类使用超全攻略(上):创建、遍历及容量操作深度解析
c++·stl
负二代0.020 小时前
Linux下的网络管理
linux·网络
csdn_aspnet20 小时前
C++跨平台开发,分享一些用C++实现多平台兼容的工程难题与解决方案
c++
s_daqing20 小时前
ubuntu(arm)安装redis
linux·redis·ubuntu