Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: bash script for converting WAV to AAC with fdkaac (Read 6053 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

bash script for converting WAV to AAC with fdkaac

Hi,
i am in the process of ripping my CDs in AAC so i would like to ask if any of you have ever tried to write a simple Bash script for converting WAV files into AAC files with fdkaac or whatever. For now i have to convert my files one by one by typing the same command repeatedly and that's quite time consuming.

Re: bash script for converting WAV to AAC with fdkaac

Reply #1
Code: [Select]
for i in *wav; do fdkaac -b 64k "$i"; done
(inside the folder where your .wav files reside)

Re: bash script for converting WAV to AAC with fdkaac

Reply #2
If you use parallel or similar, you can batch them up, maybe? I remember there was a script, Caudec, but now it's gone.

Re: bash script for converting WAV to AAC with fdkaac

Reply #3
If you use parallel or similar, you can batch them up, maybe? I remember there was a script, Caudec, but now it's gone.
Code: [Select]
for i in *wav; do 
    fdkaac -b 64k "$i" &
done
There, parallelism.

Re: bash script for converting WAV to AAC with fdkaac

Reply #4
Hi,
i am in the process of ripping my CDs in AAC so i would like to ask if any of you have ever tried to write a simple Bash script for converting WAV files into AAC files with fdkaac or whatever.
On Linux? I think you could just use abcde, rubyripper or something.
Quote
For now i have to convert my files one by one by typing the same command repeatedly and that's quite time consuming.
And after that you have to manually edit tags for each file, I guess.
Rippers not only just grab data from CD but also query metadata from CDDB, tag them, automatically name files from metadata, write cuesheets, check against AccurateRip DB...
Forget about writing your own bash script that works far poorer than that. Complete waste of time.

 

Re: bash script for converting WAV to AAC with fdkaac

Reply #5
where can i download the lastest version fdkaac.exe...

Re: bash script for converting WAV to AAC with fdkaac

Reply #6
You can't. You'll have to download a build setup and compile it yourself. Well, you could, but MSYS is apparently never going to be updated to work with TLS1.2, so you're out of luck. Maybe it would just be a better idea to grab Winamp or iTunes and strip their respective commercial encoders out instead?

Re: bash script for converting WAV to AAC with fdkaac

Reply #7
where can i download the lastest version fdkaac.exe...
When you're on Windows and want a scriptable command line encoder, get qaac.
It is technically a better encoder than FDK AAC, in fact it's one of the best ever made, according to listening tests.

It uses the Apple AAC encoder, which you'd have to install with Quicktime, for instance, other than that, it's just a rather minimal command line program.

Re: bash script for converting WAV to AAC with fdkaac

Reply #8
where can i download the lastest version fdkaac.exe...
Use Cygwin installer, or install WSL Ubuntu then run "apt install fdkaac".
You can run fdkaac in WSL via wsl command from win32.

Building is not difficult at all, compared to other open source projects.
Just read https://github.com/nu774/fdkaac/blob/master/INSTALL, there's nothing special.

Re: bash script for converting WAV to AAC with fdkaac

Reply #9
Thank you very much for your replies!
I ended up using abcde which is basically what i was looking for.  You just need to configure it by editing the .abcde.conf file (which can be found in /etc or in ~/) and type abcde in a terminal emulator after having inserted the CD. 

Re: bash script for converting WAV to AAC with fdkaac

Reply #10
thanks~~

Re: bash script for converting WAV to AAC with fdkaac

Reply #11
I use ffmpeg with aac_fdk from Zeranoe's FFmpeg Builds Home Page: <http://ffmpeg.zeranoe.com/builds/>
I found better result with this bat command, bring the files you want to the flie .bat you create, the files wil place C:Temp in this example.

------------------
@ECHO ON


FOR %%A IN (%*) DO (
  "C:\Program Files\ffmpeg-20151003-git-061b67f-win32-shared\bin\ffmpeg" -i %%A -vn -c:a libfdk_aac -profile:a aac_he -ar 88200 -b:a 160k -y "C:\Temp\%%~nA.m4a"
)
---------
-The result is a 160 kbps he-aac file that sounds equivalent at 320 kbps lame mp3 (saved at C:\Temp in this example)
-if the original file have 48 kHz the result are yet better, you can use a video file i. e.
-Original studio editions (masters) when done at 60, 88 kHz have good results yet in 20-30 KHz audio spectrum! (observed in Adobe Audition audiograms and some mastering i done). Good to producers!
-the "ffmpeg-20151003-git-061b67f-win32-shared" part must be the folder name of bin/ffmpeg.exe that you have after download and place the program in "Program Files" folder, it may change in your version!
-some audio systems (or old tv media boxes) can't handle the HE part or files at 88,2 kHz, if you have them, sell it!!