Log in

View Full Version : Help with batch audio from video conversion


redfordxx
1st December 2011, 16:17
Hi,
I need to convert lot of videoclips of all kinds into aac/mp4. There is anything possible in the list: vob, mpg, wmv, avi, mp4... (basically it is cleanup of my HD)
I wanna do it in batch process. The video part is already running with x264 and I don't know what with the audio. I want these files feed to neroaacenc but this tool expects WAV format. So I need something before...my idea is to have batch job like this or similar, without any avs script per each file:
"...\conversiotool.exe" -options -input "Video 1.mpg" | "C:\Program Files (x86)\MeGUI\tools\neroaacenc\neroaacenc.exe" -ignorelength -q 0.2 -if - -of "Video 1.mp4"
"...\conversiotool.exe" -options -input "Video 2.wmv" | "C:\Program Files (x86)\MeGUI\tools\neroaacenc\neroaacenc.exe" -ignorelength -q 0.2 -if - -of "Video 2.mp4"
"...\conversiotool.exe" -options -input "Clip 1.avi" | "C:\Program Files (x86)\MeGUI\tools\neroaacenc\neroaacenc.exe" -ignorelength -q 0.2 -if - -of "Video 1.mp4"

redfordxx
1st December 2011, 16:32
Question 2:
neroaacenc is adding some silence in front of every audiofile, so what I am always doing is removing he silence afterwards if it is necessary for syncing with video. And I have found steps which fulfill the goal, however it is complicated :

1. Guess how much audio silence is added by nero. usually 97ms or 117ms
2. Delay audio by the difference to the next multiple of framesize (which would be 128ms in this case), so we result in delay 31ms, resp 11ms
3. Encode delayed audio via MeGui+neroaacenc to mp4
4. Open the resulting file in MKVmerge Gui
5. Mux it (audio+chapters) into mka
6. Open in mkvinfo and see in chapters if the delay is really what I guessed in the beginning
-if not, go to 2. and set the correct delay and then do 3.,4.,7.
-if yes, finalize with step 7.
7. Mux audio to mka file without chapters and with delay -128ms

Anyone shows me easier way? Thank you.