Merge M4A files in terminal

I have several M4A (sound) files on a Mac that I want to merge into a single sound file. Can this be done using the Terminal command? Is there such a thing?

+4
source share
3 answers

Yes, ffmpeg does not work, contrary to what the Internet echo camera tells you. At least not so. It is incredible how many of them should drool their wisdumb and spend all the time.

Here. Prove me wrong with the link, but this is what you want, and this is the only place you will see it. Tres simple.

ffmpeg -i file1.m4a -acodec copy file1.aac ffmpeg -i file2.m4a -acodec copy file2.aac cat file1.aac file2.aac >>filenew.aac ffmpeg -i filenew.aac -acodec copy -bsf:a aac_adtstoasc filenew.m4a 

I compiled my own ffmpeg for additional libraries, so I hope this is one of the standard ones. If not, it is definitely worth the hassle. I could not verify this on the second system, but on my old Hardy Heron Ubuntu grunt system the merged file has all the necessary m4a metadata and tags and there are no changes in the sound quality.

+4
source

FFMPEG can help you with this. Chekc of How to Protect Media.

+2
source

Are you trying to play sound one by one or at the same time play each other?

In any case, FFmpeg can do the trick. The way I read your question, you want them to play at the same time ... If that happens, try:

ffmpeg -i [input1] -i [input2] -filter_complex "[0:a][1:a]amerge=inputs=2[a]" -map [a] -c:a libfdk_aac out.m4a

Note: this is audio compression in AAC. This is one of the best audio encoders, so you won’t notice the difference, but if you need to maintain quality, you can always without compression with pcm_s16le . However, I think you would be better off heading to a WAV file.

0
source

Source: https://habr.com/ru/post/1498874/


All Articles