Thursday, April 18, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 3037  / 3 Years ago, sat, august 28, 2021, 8:28:03

I have a folder that contains audio files, files are in sequence named from 1 to 150 but none of the files have file extension.
What I want is to convert them to aac or.mp3 and If I can join them as a one audio file that I will be fantastic.



Can some one help me out with this??



Thank you in advanced


More From » ffmpeg

 Answers
1

get a recent, real ffmpeg build



The fake version in the repository from the Libav fork can not do this. You can download a Linux build of ffmpeg or follow a step-by-step guide to compile ffmpeg.



concatenate/join/combine the audio



Generally the concat demuxer or the concat filter can be used if all of the inputs are similar, but that may be difficult with so many inputs of various formats and properties. Usually I tend to avoid creating temporary files since the concat demuxer or the concat filter alone usually work, but perhaps you can encode them to PCM in WAV and then use the concat demuxer. Assuming there are only audio files in the directory, and your audio files are in ~/Desktop/test:



$ cd ~/Desktop/test
$ mkdir audio
$ for f in *; do ffmpeg -i "$f" -acodec pcm_s16le -ar 44100 -ac 2 audio/"$f".wav; done
$ for f in audio/*.wav; do echo "file '$f'" >> mylist.txt; done
$ ffmpeg -loglevel error -f concat -i mylist.txt -acodec libmp3lame -aq 4 -metadata title="Your Title" -metadata author="Levan" output.mp3

[#27025] Sunday, August 29, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
montwim

Total Points: 103
Total Questions: 112
Total Answers: 120

Location: Vietnam
Member since Mon, Mar 14, 2022
2 Years ago
;