Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi There

I am using ffmpeg and I am able to receive PCM audio packets from 3 different mics to one program, I want to be able to merge the audio and then save it to file, but I dont know how to merge these audio inputs, I am receiving packets from each mic one at a time and I dont have a timestamp or a way to know when to merge the audio streams.

1.) Does anyone know how I can achieve this using ffmpeg?
2.) Is there a way to figure out what the timestamp is on these so that I can merge the proper PCM packets?

Thanks in advance.
Posted
Comments
Bernhard Hiller 10-Jul-14 2:31am    
How do you "receive" the "audio streams"? Can you be sure that the "clocks" of the microphones run at exactly the same speed? Better make sure that it is one clock controlling all microphones.
Why don't you record three channels in parallel, and then later on claculate the "mono mix" from the 3 channels?

1 solution

Assuming your input is synched in time and you're using the same PCM sampling on all channels... just make a "mixer"...
http://stackoverflow.com/questions/5126169/programmatically-merging-two-pieces-of-audio/5126209#5126209[^]
That's one example, but I'm sure you can find a handful of examples online. As for time stamping, I'm not sure what your audio sources are or how you're getting your input.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900