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...
Code:
for %%a in ("*.mp4") do "C:\Program Files\Hybrid\64bit\ffmpeg.exe" -i %%a -vn -c:a copy -y downres\%%~na.m4a
pause
# this script extracts audio track only
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 8 of 8
Thread
-
-
why not take the code from davexnet and convert all the mp4 to ac3.
Code: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
-
I'll try that.
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 -
The 2nd folder I used the bat file on is fine. Something happened along the way through all the programs I used on the first folder trying to convert and normalize the audio. Most of the files are alright but a dozen or more of the original mp4 files got messed up. They were the first few files in the folder. All the files after that were alright.
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.
Similar Threads
-
How to batch convert/multiplex any files with ffmpeg
By Baldrick in forum User guidesReplies: 215Last Post: 1st Dec 2023, 12:38 -
batch convert DTS to Ac3 using ffmpeg
By Mishari in forum Newbie / General discussionsReplies: 7Last Post: 7th Apr 2022, 17:23 -
How to Batch Process 768kbps DTS .m4a Audio Files to AC3 5.1ch 640Kbps
By askfriends in forum AudioReplies: 5Last Post: 4th Aug 2021, 07:17 -
FFMPEG - Convert M2TS file to MP4 or M4V while retaining TrueHD + AC3
By DavidFVancouver in forum Newbie / General discussionsReplies: 1Last Post: 7th Feb 2021, 05:48 -
Create batch file for ffmpeg to increment the file output
By Bassquake in forum Video ConversionReplies: 2Last Post: 25th Nov 2019, 06:03