i have a mkv video file, and a number of aac audio tracks, that i want to insert into the mkv file, replacing the existing audio tracks. for example:
i want to automate this to repeat for many videos, so i need a batch command. the output should be placed in a new file, eg. 01_replaced.mkv. the video track should remain untouched, the audio tracks are to be replaced with the given files at the given positions.HTML Code:- 01.mkv video file, contains following tracks in the given order: [0] video track [1] audio track [2] audio track - 01_1.aac audio file, should replace audio track in 01.mkv at ID [1] - 01_2.aac audio file, should replace audio track in 01.mkv at ID [2]
looking at the mkvmerge manual (https://mkvtoolnix.download/doc/mkvmerge.html) i find options to rearrange tracks, copy tracks, rename tracks, etc. but there seems to be no option for replacing or overwriting an existing track in a file.
is mkvmerge the right tool for this? can anybody give me a hint on how to pull this off?
thanx for any helpful comments
+ Reply to Thread
Results 1 to 4 of 4
-
-
No muxer can replace tracks in a file. They have remux the requested tracks to a new file then delete the original(s).
-
First demux the video track with mkvextract then use mkvmerge, eg
Code:for %%h in (*.mkv) do ( mkvextract.exe tracks "%%h" 0:%%~nh.h264 mkvmerge -o "%%~nh_replaced.mkv" "%%~nh.h264" "%%~nh_1.aac" "%%~nh_2.aac")
-
Code:
for %%a in (*.mkv) do mkvmerge -o "%%~na_replaced.mkv" --no-audio "%%a" "%%~na_1.aac" "%%~na_2.aac"
Similar Threads
-
mkvmerge batch subtitle replace
By ben45 in forum Newbie / General discussionsReplies: 4Last Post: 14th Oct 2024, 22:08 -
MKVMERGE Batch Muxing multiple audio and subtitle tracks?
By jahob000 in forum Newbie / General discussionsReplies: 38Last Post: 30th May 2023, 19:13 -
Replace subtitles using mkvmerge
By Akari in forum SubtitleReplies: 11Last Post: 15th Jan 2017, 09:57 -
Invisible Audio/Video Tracks in MKVMerge
By ConverterCrazy in forum Latest Video NewsReplies: 8Last Post: 8th Aug 2015, 14:17 -
MKVMerge - Removing 'Tags for tracks'
By THRobinson in forum EditingReplies: 11Last Post: 21st Feb 2015, 13:25