Log in

View Full Version : How to Encode AC3 Audio To AAC with command line ?


Batman007
23rd February 2015, 10:04
Hello D9 ,

I use eac3to for AC3 --> AC3 conversions (With Command Line) .... But I want to convert AC3 5.1 audio --> AAC 96kbps 2CH audio

Can someone tell me command for converting AC3 5.1 audio --> AAC 96kbps 2CH ?

I don't trust MeGUI for audio encoding , so please don't suggest me to use MeGUI .. Just tell me command ....

Thank you ....

ndjamena
23rd February 2015, 10:15
http://en.wikibooks.org/wiki/Eac3to/How_to_Use

eac3to.exe "%%~fa" "..\%%~dpna.wav" -downDpl -mixlfe -log=NUL
neroaacenc.exe -2pass -br 96000 -if "%%~dpna.wav" -of "%%~dpna.m4a"

As far as I can tell EAC3To doesn't provide a bitrate option for NeroAAC.

Batman007
23rd February 2015, 10:48
http://en.wikibooks.org/wiki/Eac3to/How_to_Use

eac3to.exe "%%~fa" "..\%%~dpna.wav" -downDpl -mixlfe -log=NUL
neroaacenc.exe -2pass -br 96000 -if "%%~dpna.wav" -of "%%~dpna.m4a"

As far as I can tell EAC3To doesn't provide a bitrate option for NeroAAC.
How would I make ac3 file WAV ? Will muxing work ?

ndjamena
23rd February 2015, 11:07
No, there are two lines there with two different commands.

The first line tells EAC3To to decode the AC3 (to PCM, which is really what decoding audio is all about) then remix the channels to 2.0 and save the resulting PCM in a wav container.

The second line sends that wav file to NeroAAC to be converted to AAC at a bitrate of 96kbps using two passes (which I assume would be better). NeroAAC is what EAC3To uses for AAC conversion anyway and the exe can be found in the EAC3To Folder.

Batman007
23rd February 2015, 11:19
No, there are two lines there with two different commands.

The first line tells EAC3To to decode the AC3 (to PCM, which is really what decoding audio is all about) then remix the channels to 2.0 and save the resulting PCM in a wav container.

The second line sends that wav file to NeroAAC to be converted to AAC at a bitrate of 96kbps using two passes (which I assume would be better). NeroAAC is what EAC3To uses for AAC conversion anyway and the exe can be found in the EAC3To Folder.
PCM ?
I'm sorry but I'm new to encoding ... PLEASE tell me whats PCM and how to do it

ndjamena
23rd February 2015, 11:27
PCM is the raw uncompressed sound data... and I've given you the commands. If %%a is confusing you it's a product of the Batch (cmd) "for" loop for when you're processing entire directories. I just stole these commands from one of my batch files and removed most of the irrelevant bits... I guess I missed a few.

eac3to.exe "File.ac3" "File.wav" -downDpl -mixlfe -log=NUL
neroaacenc.exe -2pass -br 96000 -if "File.wav" -of "File.m4a"


This should work too:

eac3to.exe "File.ac3" "File.wav" -downStereo
neroaacenc.exe -br 96000 -if "File.wav" -of "File.m4a"

Is that better?

-edit- eac3to "File.ac3" stdout.wav | neroaacenc -br 96000 -ignorelength -if - -of "File.m4a"

Batman007
23rd February 2015, 19:03
PCM is the raw uncompressed sound data... and I've given you the commands. If %%a is confusing you it's a product of the Batch (cmd) "for" loop for when you're processing entire directories. I just stole these commands from one of my batch files and removed most of the irrelevant bits... I guess I missed a few.

eac3to.exe "File.ac3" "File.wav" -downDpl -mixlfe -log=NUL
neroaacenc.exe -2pass -br 96000 -if "File.wav" -of "File.m4a"


This should work too:

eac3to.exe "File.ac3" "File.wav" -downStereo -full
neroaacenc.exe -br 96000 -if "File.wav" -of "File.m4a"

Is that better?

-edit- eac3to "File.ac3" stdout.wav | neroaacenc -br 96000 -ignorelength -if - -of "File.m4a"
But how would I get the .wav file to encode ? Tell me what to do to make ac3 .wav ...
I'm new to encoding... Please give me some time and teach me... That's why I came to Doom9..
Thank you...

ndjamena
23rd February 2015, 19:50
eac3to.exe "File.ac3" "File.wav" -downStereo

[eac3to] is an audio decoding/encoding / demuxing program you claim to be aware of

"File.ac3" would be the source file, if your file doesn't have an ac3 extension, then it's likely muxed into a container with other tracks, if you just write [[ eac3to "file.???" ]] without the brackets and with the correct extension it will show you a list of tracks in the file and their eac3to track number.

"File.wav" is the output file. Simply adding a .wav extension at the end will tell Eac3to that you want a wav file with PCM data outputted. If you added a .m4a extension (which is just another way of writing mp4) that will tell eac3to to output in aac using NeroAACEnc. If you want to select a specific track in the file to re-encode you run the file through eac3to without an output file or options (as above) then find the Eac3to track number and write the output file like this [[ 2:"File.wav" ]] or if you want AAC [[ 2:"File.m4a" ]]. If you want to PIPE [|] the output to another program so it can encode the audio instead you call the file [[ stdout.wav ]] instead of [[ File.wav ]].

the -downstereo option will tell EAC3To to remix the audio to stereo.
-downDlp will also tell EAC3To to remix the audio to stereo, but using Dolby Digital Pro Logic methods.
-mixlfe will tell EAC3To to include the subwoofer channel in the remix, apparently that's not always a good idea.
-log=NUL tells eac3to to discard the log (write it to nowhere), otherwise it will create a log either in the file you specify or in a file using a default name.

I'm not sure what else you need
>> http://en.wikibooks.org/wiki/Eac3to/How_to_Use <<

Batman007
24th February 2015, 06:49
eac3to.exe "File.ac3" "File.wav" -downStereo

[eac3to] is an audio decoding/encoding / demuxing program you claim to be aware of

"File.ac3" would be the source file, if your file doesn't have an ac3 extension, then it's likely muxed into a container with other tracks, if you just write [[ eac3to "file.???" ]] without the brackets and with the correct extension it will show you a list of tracks in the file and their eac3to track number.

"File.wav" is the output file. Simply adding a .wav extension at the end will tell Eac3to that you want a wav file with PCM data outputted. If you added a .m4a extension (which is just another way of writing mp4) that will tell eac3to to output in aac using NeroAACEnc. If you want to select a specific track in the file to re-encode you run the file through eac3to without an output file or options (as above) then find the Eac3to track number and write the output file like this [[ 2:"File.wav" ]] or if you want AAC [[ 2:"File.m4a" ]]. If you want to PIPE [|] the output to another program so it can encode the audio instead you call the file [[ stdout.wav ]] instead of [[ File.wav ]].

the -downstereo option will tell EAC3To to remix the audio to stereo.
-downDlp will also tell EAC3To to remix the audio to stereo, but using Dolby Digital Plus methods.
-mixlfe will tell EAC3To to include the subwoofer channel in the remix, apparently that's not always a good idea.
-log=NUL tells eac3to to discard the log (write it to nowhere), otherwise it will create a log either in the file you specify or in a file using a default name.

I'm not sure what else you need
>> http://en.wikibooks.org/wiki/Eac3to/How_to_Use <<

Excellent... This is what I wanted to know.. I'll let you know if any error comes up ;)

Batman007
24th February 2015, 09:44
DONE !
I successfully made AC3 an AAC file with the commands you gave .... Thank you soooo much !!

Batman007
24th August 2015, 16:08
Okay people, I used this command for 2CH AAC :
neroaacenc.exe -if "File.wav" -of "File.m4a"

But, what if I have a 5.1 .ac3 audio and need 5.1 AAC audio without changing the bitrate / changing the bitrate?
Which command should I use?

I used :
eac3to.exe "file.ac3" "file.wavs"
Which gave me 6 .wav files of each channel, what command should I use to get .aac out of it with NeroAAC?

Thank you all!
You've been very useful to me :)

tebasuna51
24th August 2015, 21:23
If you have NeroAacEnc.exe at same folder than eac3to you can try:

eac3to.exe "file.ac3" "file.m4a" -quality=0.35

Use 0.35 for low AC3 bitrate (384 Kb/s), until 0.5 for high AC3 bitrate (640 Kb/s).