I am de-muxing my MP4 video files so I can normalize the aac audio files using aacgain. I use batchenc with the command "MP4Box.exe -single 1 <infile>" and "MP4Box.exe -single 2 <infile>". Doing this gives me a video file "file_track1.mp4" and an audio file "file_track2.mp4". I then run the audio files through aacgain to normalize them.
I want to batch mux the "file_track1.mp4" and "file_track2.mp4" files. I am currently using the following command.
mp4box.exe -add file_track1.mp4 -add file_track2.mp4 -new file.mp4
This command works but i have have hundreds of videos. It will take forever to type the command every time. Now every audio and video file have the same file name but have _track1 and _track2 at the end. They all have the same .mp4 container.
I need a command I can put into a .bat file, or a command I can use with batchenc.
I have used My MP4box Gui, but the video and audio always un-sync. YAMB always allows 1 mux at a time. You can't make a que. Any help would be great. Thanks.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
Last edited by jd185051; 28th Apr 2012 at 21:33.
-
Try put
Code:for %%a in ("*_track1.mp4") do ( set var=%%a mp4box.exe -add %var:~0,-11%_track1.mp4 -add %var:~0,-11%_track2.mp4 -new %var:~0,-11%-new.mp4 )
(the %var:~0,-11% substrings the file name without the _track1.mp4)Last edited by Baldrick; 30th Apr 2012 at 03:14.
-
It didnt work but it seems you were close. Heres what happened.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\John\Videos\vob\The Shield>mux
C:\Users\John\Videos\vob\The Shield>for %a in ("*_track*.mp4") do (set var=%a mp
4box.exe -add ~0,-11var:~0,-11var:~0,-11.mp4 )
C:\Users\John\Videos\vob\The Shield>(set var=The Shield.S01E01.Pilot_track1.mp4
mp4box.exe -add ~0,-11var:~0,-11var:~0,-11.mp4 )
C:\Users\John\Videos\vob\The Shield>(set var=The Shield.S01E01.Pilot_track2.mp4
mp4box.exe -add ~0,-11var:~0,-11var:~0,-11.mp4 )
C:\Users\John\Videos\vob\The Shield>mux.bat
C:\Users\John\Videos\vob\The Shield>for %a in ("*_track*.mp4") do (set var=%a mp
4box.exe -add The Shield.S01E01.Pilot_track2.mp4 mp4box.exe -add ~0,-11var:~0,-1
1var_track1.mp4 -add The Shield.S01E01.Pilot_track2.mp4 mp4box.exe -add ~0,-11va
r:~0,-11var_track2.mp4 -new The Shield.S01E01.Pilot_track2.mp4 mp4box.exe -add ~
0,-11var:~0,-11var.mp4 )
C:\Users\John\Videos\vob\The Shield>(set var=The Shield.S01E01.Pilot_track1.mp4
mp4box.exe -add The Shield.S01E01.Pilot_track2.mp4 mp4box.exe -add ~0,-11var:~0,
-11var_track1.mp4 -add The Shield.S01E01.Pilot_track2.mp4 mp4box.exe -add ~0,-11
var:~0,-11var_track2.mp4 -new The Shield.S01E01.Pilot_track2.mp4 mp4box.exe -add
~0,-11var:~0,-11var.mp4 )
C:\Users\John\Videos\vob\The Shield>(set var=The Shield.S01E01.Pilot_track2.mp4
mp4box.exe -add The Shield.S01E01.Pilot_track2.mp4 mp4box.exe -add ~0,-11var:~0,
-11var_track1.mp4 -add The Shield.S01E01.Pilot_track2.mp4 mp4box.exe -add ~0,-11
var:~0,-11var_track2.mp4 -new The Shield.S01E01.Pilot_track2.mp4 mp4box.exe -add
~0,-11var:~0,-11var.mp4 )
C:\Users\John\Videos\vob\The Shield> -
I recently found a thread with exactly what i need but with AVI DivX videos and MP3 audio. I am not good with commands or making .bat files. But a similar setup with MP4 video files and AAC audio using AACGain and MP4Box would really help. I want to put AACgain and MP4box in the same directory as my mp4 files, and have a .bat file normalize all mp4 file in the same directory.
THREAD HERE: https://forum.videohelp.com/threads/255147-Mini-Guide-Normalizing-Audio-for-Multiple-AVI-filesLast edited by jd185051; 29th Apr 2012 at 23:18.
-
OK i feel a little stupid. I read that whole thread and there is not only .bat files made for doing what I want, but a gui that seems work work great.
-
Hello!
I used this to mux several .h264 with .mp3 files in .mp4 container and it worked!
Code:for %%A in ("*.h264") do ( set var=%%A set var=!var:~0,-5! "C:\Program Files\Multimedia\My MP4Box GUI\Tools\mp4box.exe" -add "!var!.h264" -add "!var!.mp3" -new "!var!.mp4" )
Similar Threads
-
MP4Box problems with AC3 using command line
By mrloofer in forum Video ConversionReplies: 7Last Post: 22nd Apr 2015, 22:58 -
Batch mux flv to mkv?
By Pitorasilo in forum Video ConversionReplies: 13Last Post: 14th Apr 2012, 05:25 -
MKVMerge Batch Command Help
By DarrellS in forum Video ConversionReplies: 1Last Post: 31st Oct 2010, 17:05 -
How do you batch reencode audio in mp4s? - now starting project over
By yoda313 in forum Video ConversionReplies: 0Last Post: 2nd May 2010, 15:54 -
Command line syntax for mp4box?
By freebird73717 in forum Newbie / General discussionsReplies: 4Last Post: 25th Jul 2008, 22:57