VideoHelp Forum

+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. 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.
    Last edited by LouieChuckyMerry; 2nd Jan 2022 at 20:58. Reason: Damn Syntax
    Quote Quote  
  2. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    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
    Cheers.
    Last edited by pcspeak; 6th Jan 2022 at 14:04.
    Quote Quote  
  3. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    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
    Cheers.
    Last edited by pcspeak; 6th Jan 2022 at 15:31.
    Quote Quote  
  4. 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 16:51. Reason: Information. Information.
    Quote Quote  



Similar Threads