[FFmpeg-user] FFmpeg amerge with itsoffset on only one audio stream

Paulo Miguel Almeida Rodenas paulo.rodenas at agenciaclickisobar.com.br
Wed Sep 11 21:22:43 CEST 2013


I'm facing a situation which I spent the whole day trying to get this working but unfortunately I'm running out of ideas and I thought you gyus might help me out.

I have two streams, one audio stream for the customer (micMyStream1) and one video and audio stream for the seller (MyStream1). The idea behind this is pretty simple. The user speaks to his microphone and this audio is conveyed to the seller and then the seller answers the user's question but using a video and audio stream.

So far so good, it works pretty fine right now but someone came up with the idea of "merging" the audio from the user's stream with the audio and video from the seller in order to make a third person to watch the whole conversation between them

Unfortunately when I audio merge one audio stream ( probably the user's one) the conversation goes a little bit awkward like below:

Expected Scenario:

  *   User: Hi, How are you ?
  *   Seller: I'm good thanks, How can I help you ?
  *   User: I'd like to know a little more about the product next to you
  *   Seller: Sure, Which information would you like to know?
  *   User: How much does it cost?
  *   Seller: It's 100 bucks

Actual Scenario:

  *   User: Hi, How are you ?
  *   User: I'd like to know a little more about the product next to you
  *   Seller: I'm good thanks, How can I help you ?
  *   User: How much does it cost?
  *   Seller: Sure, Which information would you like to know?
  *   Seller: It's 100 bucks

It seems like one stream comes much faster than another so when I merge the audio the conversation makes no sense for the spectator. I tried to use in some many ways the itsoffset parameters but with no success

Do you guys got any idea of how can I get that working ? I mean, is there anything I can do to postpone the fast stream to make the conversation closer to the expected?

This is the last ffmpeg commando I'm using.

ffmpeg -itsoffset 00:00:07 -i rtmp://<ip>:1935/live/micMyStream1 -i rtmp://<ip>:1935/live/MyStream1  -filter_complex [0:a][1:a]amerge -codec:a aac -ac 2 -strict -2 -f flv rtmp://<ip>:1935/live/bcMyStream1


Thanks in advance


Paulo Almeida




More information about the ffmpeg-user mailing list