0

I tried three different methods in order to concatenate songs

  • Audacity: Works, but it adds a "click" sound between the first and second song
  • cat command: I tried cat *.wma > result.wma and cat second.wma >> first.wma. Both have the same problem, the resulting file is just the first one.
  • ffmpeg: ffmpeg -i "concat:uno.wma|dos.wma" -acodec copy result.wma, same problem as cat command, the file result.wma is a copy of uno.wma

Any help?

  • WMA files cannot be concatenated directly. You'd have to decode them into, say PCM WAV, then concatenate, then encode back to WMA. – slhck Feb 24 '16 at 15:16
  • I tried ffmpeg -i song.wma song.wav and then concatenate, still doesn't work – Zucca Feb 24 '16 at 16:13
  • In principle, it should work. Try the other options listed here, either using the concat demuxer, or -- if that doesn't work -- directly concatenating the WMA files using the filter approach. If you could add the exact ffmpeg commands you're using, including the command line output, we can help you better. – slhck Feb 24 '16 at 16:19
  • Worked with the command ffmpeg -f concat -i mylist.txt -c copy output but it has the same problem as audacity now, it makes a "click" sound in the union of the two songs. – Zucca Feb 24 '16 at 17:00
  • Did you add the WMA or WAV files to mylist.txt? – slhck Feb 24 '16 at 17:03
0

Have you tried the sox tool? I typically use this to concatenate hundreds of .wav files at a time using sox *.wav combined_audio.wav

0

Without seeing the waveforms it's difficult to say for sure, but if you are concatenating at points of supposed silence, then the best explanation for a click would be that one of more of the files has a bad DC offset. If you are doing it a a non-silent point, then you are almost certain to have a non-equal offset at that point.
The sudden transition between the two offsets is what you hear as a click.

The simplest fix would be to generate a short cross-fade between the two.

See - How to Geek : How to Use Crossfade in Audacity for Seamless Transitions Between Audio Tracks for how to achieve this [outside the scope of SE]

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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