0

I'm mixing two wav audio files as follows

/data/data/com.example.letsjam/app_bin/ffmpeg -i /storage/emulated/0/test1.wav -i /storage/emulated/0/test2.wav -filter:v amerge=inputs=2 /storage/emulated/0/output.wav

The output wav file only has the sound of the first audio. Both audio files have same sample rate and same number of channels and of-course the same format i.e. wav. Here is the shell output of the command above:

shellLine: Input #0, wav, from '/storage/emulated/0/test1.wav':
shellLine:   Metadata:
shellLine:     encoder         : Lavf55.42.100
shellLine:   Duration: 00:00:05.02, bitrate: 2048 kb/s
shellLine:     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 64000 Hz, stereo, s16, 2048 kb/s
shellLine: [wav @ 0x2d89340] Estimating duration from bitrate, this may be inaccurate
shellLine: Guessed Channel Layout for  Input Stream #1.0 : stereo
shellLine: Input #1, wav, from '/storage/emulated/0/test2.wav':
shellLine:   Duration: 00:00:14.04, bitrate: 1024 kb/s
shellLine:     Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 64000 Hz, 2 channels, s16, 2048 kb/s
shellLine: Output #0, wav, to '/storage/emulated/0/output.wav':
shellLine:   Metadata:
shellLine:     ISFT            : Lavf55.42.100
shellLine:     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 64000 Hz, stereo, s16, 2048 kb/s
shellLine:     Metadata:
shellLine:       encoder         : Lavc55.66.100 pcm_s16le
shellLine: Stream mapping:
shellLine:   Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
shellLine: Press [q] to stop, [?] for help
shellLine: size=    1254kB time=00:00:05.01 bitrate=2048.2kbits/s    
shellLine: video:0kB audio:1254kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.007941%

Am i doing anything wrong? I also tried amix but got the same result. The generated output only has the sound of the first audio file. Any help would be appreciated!

  • Also, providing the input files, if possible, would help us attempt to duplicate the issue. – llogan Aug 3 '14 at 16:33
  • Ok here are the input files: onedrive.live.com/… I'm converting these audio files to wav with the following command /data/data/com.example.letsjam/app_bin/ffmpeg -y -i /storage/emulated/0/Ringtones/hangouts_incoming_call.ogg -ar 64000 -ac 2 -vn /storage/emulated/0/test1.wav ` – Abdul Qadir Aug 3 '14 at 18:30
  • Here's the complete console output: pastebin.com/QCz079m0 – Abdul Qadir Aug 3 '14 at 18:41
0

Have you tried using audacity? You can have there multiple lines of audio synchronized, an then you can mix and export them. See this manual entry.

| improve this answer | |
  • I'm actually using ffmpeg binary in my android app. So I start a new process everytime I need to do anything related to audio from my android application and generate commands programatically. – Abdul Qadir Aug 3 '14 at 18:39
  • @AbdulQadir Did you read this example? – msrd0 Aug 3 '14 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.