1
votes

I have two live audio streams, they both are MONO streams. Now I want these two streams to merge in one stream and output to single new stream.

I am merging two input streams with following command:

ffmpeg -i rtmp://myIp:1935/live/stream1 -i rtmp://myIp:1935/live/stream2 -codec:a aac -strict -2 -filter_complex "[0:a][1:a]amerge" -f flv rtmp://myIp:1935/live/myStream

The above command works but when I listen to new stream i.e. myStream, both streams are able to listen but in separate channel. Means stream1 is only in Left channel and stream2 is only in Right channel.

What I want is, both input stream stream1 and stream2 should be available to both the channels (Left & Right).

I have tried lot but can't get success and I am not good at ffmpeg also. So Is there anyone who can help me in this ???

1

1 Answers

2
votes

Basically you're on the right track with your approach. But you used the amerge filter (the same filter is named join in LIBAV). This filter combines individual mono streams into a single multichannel streams.

From your description, it looks rather that you want to achieve something different: you want to mix those two mono streams into a single mono stream. You can achieve that with the amix-Filter.