使用RTMP实时视频ffmpeg延迟(Live video ffmpeg latency using RTMP)

编程入门 行业动态 更新时间:2024-10-26 07:37:16
使用RTMP实时视频ffmpeg延迟(Live video ffmpeg latency using RTMP)

我有一个我想通过RTMP广播的视频流。

我使用ffmpeg来执行此操作,使用以下命令:

ffmpeg -i http://192.168.1.77:18000/stream.flv -c copy -f flv rtmp://localhost/myapp/mystream

据我所知,转码视频流会引入一些延迟。 所以我的问题是:我是否有可能通过使用此ffmpeg命令(副本)在输出流中引入延迟?


旁注:我正在尝试将我的实时视频流重定向到nginx-server,以便为几个jwplayers广播它(通过RTMP)。 到目前为止,我得到了1秒的延迟和一些帧,我想知道是否有可能减少它。

I have a video stream that I want to broadcast via RTMP.

I'm using ffmpeg to do so, with the following command:

ffmpeg -i http://192.168.1.77:18000/stream.flv -c copy -f flv rtmp://localhost/myapp/mystream

As far as I know, transcoding the video stream would introduce some latency. So my question is: is it possible that I am introducing latency in the output stream by using this ffmpeg command (copy)?


Side note: I'm trying to redirect my live video stream to a nginx-server in order to broadcast it (via RTMP) for several jwplayers. So far I got a delay of 1 second and some frames and I am wondering if it is possible to reduce it.

最满意答案

好吧,我解决了我的问题!

我最终尝试使用不同的播放器和不同的设置并设法获得一些帧延迟(或根本没有延迟),所以我猜这个ffmpeg命令根本不会引入延迟。

仅供记录,我正在使用带有以下设置的flowplayer:

$f("streams", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", { clip: { url: 'mystream', provider: 'rtmp', live: true, bufferLength: 0, bufferTime: 0, }, plugins: { rtmp: { url: 'flowplayer.rtmp-3.2.3.swf', netConnectionUrl: 'rtmp://192.168.1.196:1935/myapp' } } });

Well, I solved my problem!

I ended up trying with a different player and different settings and managed to get some frames latency (or no latency at all), so I guess this ffmpeg command is not introducing latency at all.

Just for the record, I'm using flowplayer with the following settings:

$f("streams", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", { clip: { url: 'mystream', provider: 'rtmp', live: true, bufferLength: 0, bufferTime: 0, }, plugins: { rtmp: { url: 'flowplayer.rtmp-3.2.3.swf', netConnectionUrl: 'rtmp://192.168.1.196:1935/myapp' } } });

更多推荐

本文发布于:2023-08-06 12:28:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1448626.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:实时   视频   RTMP   ffmpeg   latency

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!