I have a list of .m4v files. I have a list of .mp3 files (which happen to be the same file name as the corresponding .m4v files).
The .m4v files contain lower quality audio. The .mp3 files contain a better quality audio.
I would like to replace the audio in the .m4v files, with the corresponding audio in the .mp3 files.
I would not like to do this individually for 10000+ files, in either mkvmerge or ffmpeg.
I have tried a batch script with something like this but to no avail:
As well as (as I wanted the output in a different directory):Code:FOR %%a IN ("*.m4v") DO ffmpeg -i "${%%a}" -i "${%%a//.m4v/.mp3}" -vcodec copy -acodec copy "${%%a//.m4v/.mp4}" pause
These so far have been unsuccessful (have only encountered errors). I am not sure how to fix this.Code:FOR %%a IN ("*.m4v") DO ffmpeg -i "%%a" -i "%%a" -vcodec copy -acodec copy "outputDirFoo123\%%~na.mp4" pause
Could someone please indicate how I can batch process what I want above? Is there a better way to do it than I am here?
Many 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 5 of 5
Thread
-
-
Code:
FOR %%a IN (*.m4v) DO ffmpeg -i "%%a" -i "%%~na.mp3" -map 0:v -map 1:a -c copy "outputDirFoo123\%%~na.mp4" pause
-
-
Try to add -map_metadata 1 or -map_metadata:s:a 1:s:a. I'm not sure it will work though as you expect or at all. Metadata from different formats cannot always be copied.
-
Similar Threads
-
replacing (and syncing) an audio track of an MP4 video file
By rotchild in forum Newbie / General discussionsReplies: 6Last Post: 23rd Dec 2016, 05:32 -
replacing (and syncing) an audio track from an MP4 video file
By rotchild in forum RestorationReplies: 0Last Post: 14th Dec 2016, 21:30 -
Adding lossless audio to video / replacing audio track
By Jacobson in forum Video ConversionReplies: 72Last Post: 29th Jul 2016, 22:05 -
How do I (BATCH) set a specific subtitle track, and audio track as default?
By MountainSplash00 in forum Newbie / General discussionsReplies: 3Last Post: 2nd Dec 2014, 07:53 -
mkv replacing audio track and out of sync
By chaussettdeguerr in forum EditingReplies: 6Last Post: 25th Mar 2013, 23:42