Hello, thanks in advance for any help, and Happy 2022 .
I'm trying to learn how to batch remove-clear all of multiple .mkv files' individual tracks "Track name:"s using either MKVToolNix GUI's "Job output\When finished..." feature with either mkvpropedit.exe or a .bat file, or just a .bat file. Heck, any way other than individually . For clarity:
1) Multiple jobs are queued in MKVToolNix GUI (v64.0.0) and will be created in a single folder.
2) The only fields I want cleared are the individual tracks' "Track name:" (as seen in "MKVToolNix GUI\Multiplexer\Input", the bottom, left box "Tracks, chapters and tags").
I've searched high and low but can't find a solution and if I've posted this question in the wrong place then I apologize.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
Last edited by LouieChuckyMerry; 2nd Jan 2022 at 19:58. Reason: Damn Syntax
-
This worked on a couple of test files.
I did NOT try it with multiple audio or subtitle tracks, so I don't know the correct parameters.
You'll need to experiment.
Remove by stream type and number.
e.g. the movie has 1 video, 1 audio and 1 subtitle stream.
--track-order
0:0, is video
0:1, is audio
0:2 is subs
--track-name 1: - refers to the audio track
--title "" - deletes the contents of the title tag - for the audio track
Code:@echo off :: Process all MKV in a folder. if not exist New\*.* md New for %%a in ("*.mkv") do call :process "%%a" goto :end :process title "%~n1" "C:\Program Files\MKVToolNix\mkvmerge.exe" --ui-language en --output "New\%~1" --track-name 1: "%~1" --title "" --track-order 0:0,0:1,0:2 goto :eof :end
Last edited by pcspeak; 6th Jan 2022 at 13:04.
-
I use this to wipe all metadata. And chapters.
Code:@echo off :: Clear all metadata if not exist New\*.* md New for %%a in ("*.mp4", "*.mkv") do call :process "%%a" goto :end :process ffmpeg.exe -i "%~1" -map_chapters -1 -map_metadata -1 -metadata title="" -metadata comment="" -map 0 -c:v copy -c:a copy -c:s copy -y "New\%~1" goto :eof :end pause
Last edited by pcspeak; 6th Jan 2022 at 14:31.
-
Thanks for your reply (and patience), pcspeak. And apologies for my ignorance, but I'm not quite sure how to apply the above "scripts". Thanks for any additional information.
EDIT: After having the time and focus, I was able to make the first .bat file work (I had to change the path for mkvmerge.exe). Thanks for that! Unfortunately I can't figure out how to make the second .bat file work. I receive the error message "'ffmpeg.exe' is not recognized as an internal or external command, operable program or batch file." I tried changing the "ffmpeg.exe" to the path of my ffmpeg.exe but receive a "Permission denied" error after many lines of text that I understand as words but not their contextual meaning .Last edited by LouieChuckyMerry; 12th Jan 2022 at 15:51. Reason: Information. Information.
-
Hi, in searching for this topic i end creating a powershell script
Code:Get-ChildItem -Path . -Recurse -Filter *.mkv | ForEach-Object { $mkvFile = $_.FullName $baseMkvName = $_.BaseName $totalTracks = (mkvinfo.exe $mkvFile | Select-String "Track ID" | Measure-Object).Count Write-Host "The file $baseMkvName has: $totalTracks tracks." for ($i = 0; $i -lt $totalTracks; $i++ ) { $trackID = $i + 1 $newTitle = "Track: $trackID" mkvpropedit.exe $mkvFile --edit track:$trackID --set "name=$newTitle" Write-Host $newTitle } }
I hope it helps anyone searching for ideas for this kind of topic.
<3 -
cosmicuser: I just noticed your comment. Would you, please, be willing to explain to me how to use your script? I'd very much appreciate it .
Similar Threads
-
Batch rename audio tracks like so "[Codec] [Language] [Channels]"
By aur0n in forum AudioReplies: 0Last Post: 19th Jul 2021, 19:52 -
Program to cut M2TS file into clip with all tracks "un-touched"
By kpic in forum EditingReplies: 2Last Post: 12th Dec 2018, 13:20 -
BATCH remove audio track from mkv
By MarquisdeOz in forum AudioReplies: 53Last Post: 30th Jul 2018, 08:48 -
"Restore SDR" or "Remove HDR" its possible?
By danfgtn in forum Newbie / General discussionsReplies: 7Last Post: 7th Jul 2018, 15:33 -
Sony Vegas - Can you "fine tune" tracks?
By Xanadu2 in forum EditingReplies: 3Last Post: 21st Dec 2017, 15:47