0

I've been trying to prepend an audio mp3 file to a recorded mp3. The recorded mp3 is mono channel (having 1 channel as I made it record). I want the user of my app to select any audio file say mp3 and prepend that to my recorded file. The selected file can be multichannel but the recorded file is 1 channel. Is this possible using any tool. I tried using sox with the following command

sox input1.mp3 input2.mp3 output.mp3

but this gives error that the input files must have same number of channels. Thanks for the help.

bir433
  • 61
  • 5
  • Do you want to simply drop all but one of the extra channels, or do you want to downmix all channels to create mono? – llogan Jul 23 '13 at 18:09
  • I don't know actually. Can the recording with the mono be converted to stereo and if so will there be quality loss. – bir433 Jul 24 '13 at 05:39
  • You could duplicate the mono channel, then you'll have "stereo" where left and right are identical. – chirlu Jul 25 '13 at 12:06
  • I think I got the hint. I converted my recorded 1 channel audio to 2 channel audio duplicating the single channel. And then tried to append the both 2 channel audios. It worked. Thanks for the suggestions. – bir433 Jul 29 '13 at 06:07
  • For those looking for the solution: I converted the single channel audio to two channel audio using ffmpeg like "ffmpeg -i singleChannel.mp3 -ac 2 2Channel.mp3" and then appended using sox like "sox 2Channel.mp3 input.mp3 output.mp3" – bir433 Jul 29 '13 at 06:09

0 Answers0