I used a batch file to extract the audio from mp4 files which gave me a folder full of m4a files but I can't find a batch file or a program that will batch convert those m4a files to ac3.
Here is the batch file I used to extract the m4a audio...
for %%a in ("*.mp4") do "C:\Program Files\Hybrid\64bit\ffmpeg.exe" -i %%a -vn -c:a copy -y downres\%%~na.m4a
# this script extracts audio track only
+ Reply to Thread
Results 1 to 8 of 8
why not take the code from davexnet and convert all the mp4 to ac3.
for %%a in ("*.mp4") do "C:\Program Files\Hybrid\64bit\ffmpeg.exe" -i %%a -vn -c:a ac3 -ar 48000 -ab 256k -y downres\%%~na.ac3
The batch file I used to make the m4a files was so I could use mp3gain to set the gain to 89dB which it had no problem doing. The problem, I just found out was that half the files that converted to m4a were about half the length of the mp4 files that I got the audio from.
I've been using Audacity to normalize the audio and save as ac3 and it has created the files perfectly with no sync issues. It's just a slow process and I was looking for a faster way.
I don't know why half the m4a files created by ffmpeg were so short since Audacity uses an ffmpeg plugin to create the ac3 files
Do the ac3 files play back twice as fast or they truncated?
These are the kinds of details you should be thinking about
I'm using Virtualdub to add the ac3 files and everything is working fine. No sync issues so far.
Thanks for your help.
I ran into a few problems with that batch file but I found a great program call FFmpeg_Batch_AV_Converter.