News:

--

Main Menu

Batch convert MKV to MP4 with AAC crashing

Started by Ineedcoffee, February 17, 2013, 10:33:15 AM

Previous topic - Next topic

Ineedcoffee

Hi,

I am quite new to all of this however I created a bat file to batch convert some mkv's to mp4's whilst also converting the audio to AAC. It keeps on crashing as soon as it is run, here is my code;

set avidemux="C:\Program Files (x86)\Avidemux 2.5\avidemux2.exe"
set audiocodec=AAC
set outputformat=MP4
for %%f in (*.mkv) do %avidemux% --output-format MP4 --audio-codec %audiocodec% --force-alt-h264 --load "%%f" --save "%%f.mp4"


I can't see any reason that this does not work. The program loads however crashes as soon as it is about to start converting. I am running Win7 64.

Any help would be greatly appreciated.

Thanks.

Jan Gruuthuse

When doing it manual in avidemux GUI 2.5, does it work? What version exactly are you using?
Myself found it easier to set the wanted parameters in avidemux (2.6.1) with saving as project, edit out load references to video in the project, calling the settings back from a batch (windows) script (linux). Should be very similar.
Important for 2.6.1 is to remake previously made projects in 2.6.0/1 and resave these. Some small differences do exist between current version and previous ones.
Main source: Combination of command-line and JS scripting
look for --run something.js something would be a saved project!
Example for switching audio tracks: 2.6 audio track switching in job.py

styrol

Quote from: Ineedcoffee on February 17, 2013, 10:33:15 AM
set avidemux="C:\Program Files (x86)\Avidemux 2.5\avidemux2.exe"
set audiocodec=AAC
set outputformat=MP4
for %%f in (*.mkv) do %avidemux% --output-format MP4 --audio-codec %audiocodec% --force-alt-h264 --load "%%f" --save "%%f.mp4"

I assume AAC codec has to be specified:
"audiocodec=LavAAC"
or
"audiocodec=Faac"

Ineedcoffee

Thanks for the reply's. I'm using 2.5.6 and setting it in the GUI does work. I just do Video Copy and Audio AAC (Facc) (also change filters to stereo and dynamic range compression) and this works fine.

I tried changing the AAC to LavAAC and Faac as you suggested styrol but it just comes up with audi codec errors