VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab DRM and remove iTunes movie & music protection! :)
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Member
    Join Date
    Nov 2015
    Location
    United States
    Search PM
    I am trying to batch convert a bunch of .eac3 files to .m4a @128. the folder name is
    H:\Need to Encode\Doctor

    Any help would be greatly appreciated
    Quote Quote  
  2. Code:
    pushd H:\Need to Encode\Doctor
    for %%a in (*.eac3) do "c:\programs\ffmpeg\ffmpeg.exe" -i "%%~a" -c:a aac -b:a 128k -ac 2 "%%~na.m4a"
    Needs ffmpeg, obviously.


    (I set -ac 2 for stereo downmix which I assume you want at only 128 kbps)
    Last edited by sneaker; 12th Jun 2018 at 08:15. Reason: -ac 2 is stereo downmix, not -c:a 2
    Quote Quote  
  3. Member
    Join Date
    Nov 2015
    Location
    United States
    Search PM
    the eac3 audio track is already stereo. And this sounds stupid, but where do I paste that code into? Command Prompt, ffmpeg? Usually I go to command prompt and do one file at a time with eac3to
    Quote Quote  
  4. That specific code was meant for a batch file (open Notepad, paste, save as "whatever.bat" and double-click it). You can also use it on the prompt without a batch file but then you have to change all double percent signs (%%) to single ones (%).

    You can also use eac3to (with NeroAacEnc.exe):
    Code:
    for %%a in (*.eac3) do eac3to.exe "%%~a" "%%~na.m4a"
    Just note that eac3to's eac3 decoder is a bit outdated and supports less eac3to files than ffmpeg. So if eac3to doesn't work try ffmpeg.
    Quote Quote  
  5. Member
    Join Date
    Nov 2015
    Location
    United States
    Search PM
    This is what I have tried so far
    Code:
    pushd H:\Need to Encode\Doctor
    for %%a in (*.eac3) do "C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i "%%~a" -c:a aac -b:a 128k -c:a 2 "%%~na.m4a"
    and
    Code:
    for %%a in (*.eac3) do "C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i "%%~a" -c:a aac -b:a 128k -c:a 2 "%%~na.m4a"
    my ffmpeg.exe is 64bit and located here C:\Program Files\ffmpeg\bin

    Either one just quickly opens a dos prompt and closes
    Quote Quote  
  6. Member
    Join Date
    Nov 2015
    Location
    United States
    Search PM
    hold on a second.. Ok, I am getting an error, please see the picture "unknown encoder '2'Image
    [Attachment 45874 - Click to enlarge]
    Quote Quote  
  7. Sorry, my bad.
    -ac 2 is stereo downmix, not -c:a 2
    Quote Quote  
  8. Member
    Join Date
    Nov 2015
    Location
    United States
    Search PM
    That seemed to work, thank you. Would you mind answering another question? If I am just converting 5.1 eac3 to a 5.1 m4a what would be the code? Is it possible to boost the audio like in Ripbot?
    Quote Quote  
  9. If you leave out the "-ac x" part ffmpeg will not downmix (unless required by the encoder, e.g. mp3 will only encode to mono or stereo so 5.1 will be downmixed). -ac 6 would be 6 channels (usually 5.1).

    Audio volume:
    https://superuser.com/questions/323119/how-can-i-normalize-audio-using-ffmpeg
    https://trac.ffmpeg.org/wiki/AudioVolume
    Quote Quote  
  10. Alternatively '-ac' may be skipped at all to not force ffmpeg to particular channel number, also audio bitrate should be corresponding to channel number (i would not recommend less than 64kbps per channel if native ffmpeg AAC encoder is used), sadly to say '-q:a' doesn't work well with native ffmpeg AAC encoder.
    Quote Quote  
  11. Member
    Join Date
    Nov 2015
    Location
    United States
    Search PM
    When I do 5.1/6ch audio, I usually stick with 384.

    So if I am converting an 5.1 EAC3 audio file to a 5.1 .m4a audio file, my code would look like this?
    Code:
    pushd H:\Need to Encode\Doctor
    for %%a in (*.eac3) do "C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i "%%~a" :a aac -b:a 384k -c:a 2 "%%~na.m4a"
    is this correct
    Quote Quote  
  12. No.
    "-c:a" is selectiong the audio codec, e.g. "-c:a aac" is choosing the aac encoder. ("codec" "audio")
    "-ac x" is audio channel mixing, e.g. "-ac 6" is 6 channel audio (5.1). ("audio" "channels")
    Quote Quote  
  13. Member
    Join Date
    Nov 2015
    Location
    United States
    Search PM
    I see, let me give that a try
    Quote Quote  



Similar Threads