André Alves
André Alves

Reputation: 6775

Live video ffmpeg latency using RTMP

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.

Upvotes: 4

Views: 9330

Answers (2)

André Alves
André Alves

Reputation: 6775

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'
                    }
                }
            });

Upvotes: 4

szatmary
szatmary

Reputation: 31140

Everything will introduce a little latency. Nothing is done for free, and time keeps moving forward. 1 second is really good for rtmp. To reduce latency, you need to reduce steps between ingest and delivery. The best way to do this is use a detected server product such as wowza or FMS.

Upvotes: 1

Related Questions