0

I am using following command to merge two live audio streams and also want to manage delay between streams:

ffmpeg -i rtmp://myIp:1935/live/stream1 -i rtmp:/myIp:1935/live/stream2 -codec:a aac -strict -2 -filter_complex "[1:a]adelay=3000[delay0];[0:a][delay0]amix" -ac 2 -f flv rtmp://myIp:1935/live/myStream

Now when I run above command then stream2 is 3 seconds delay than stream1. When I run this command again then this delay changes from 3 seconds to 4 or 5 seconds and it varies on every command run.

So is there any way I can manage this delay? as delay changes on every command run I can not give static delay time.

1 Answer 1

1

Rtmp is a push based protocol. most servers, When you connect, sends video starting at the last sync point ( key frame) so the delay is the period of time form the last sync point to now. Other servers my wait until the next sync point. This gives you closer to real time, but at the expense of longer startup times for the user. Either way, it's controlled from the server, not the client.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .