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;

相关推荐
TH_18 分钟前
腾讯云-(3)-Linux宝塔面板使用
linux·云计算·腾讯云
虚伪的空想家28 分钟前
arm架构服务器使用kvm创建虚机报错,romfile “efi-virtio.rom“ is empty
linux·运维·服务器·javascript·arm开发·云原生·kvm
深藏bIue42 分钟前
linux服务器mysql目录下的binlog文件删除
linux·服务器·mysql
Dream it possible!43 分钟前
LeetCode 面试经典 150_二叉搜索树_二叉搜索树的最小绝对差(85_530_C++_简单)
c++·leetcode·面试
虾..1 小时前
Linux 进程状态
linux·运维·服务器
麦烤楽鸡翅2 小时前
简单迭代法求单根的近似值
java·c++·python·数据分析·c·数值分析
扛枪的书生2 小时前
Linux 通用软件包 AppImage 打包详解
linux
只想安静的写会代码2 小时前
网卡信息查询、配置、常见故障排查
linux·服务器·windows
sulikey4 小时前
C++ 四十年:一段跨越时代的语言旅程
c++·c++40周年
-森屿安年-4 小时前
LeetCode 283. 移动零
开发语言·c++·算法·leetcode