VideoHelp Forum

+ Reply to Thread
Results 1 to 2 of 2
  1. I have pieced together a .bat routine for merging .srt's into multiple .mkv's.

    What I'm having some difficulty with is the "track-name" for the subpic. Getting error trying to get it to fill in the track name.

    EDIT: Works fine for filling in the track-name for Video and Audio defined in the .json file.

    It errors out an the track-name for the merged subtitle comes out BLANK

    Warning: '<filename>.srt': A track with the ID 2 was requested but not found in the file. The corresponding option will be ignored.

    The bat routine uses a .json file to apply the values / labels to the "track-name" field.

    Any help getting the "track-name" to fill-in properly on the subtitle will be greatly appreciated. The video and audio "track-name" is filling in correctly.

    @echo off
    set mkvmerge="F:\Media\MKVToolNix\mkvmerge.exe"
    if not exist "MergeOptions.json" (
        echo Options file 'MergeOptions.json' not found. Exiting.
    if not exist "mkvmerge_out" (mkdir "mkvmerge_out")
    for %%f in (*.mkv) do %mkvmerge% @MergeOptions.json -o "mkvmerge_out/%%~nf.mkv" "%%~f" ""
    echo ============================
    echo Done. Press any key to exit.
      "0:480p Video",
      "1:AAC 2ch",
      "2:Non-Hearing Impaired",
    The complete .bat and .json files attached.

    FYI: I'm very new to using the command line for mkvmerge, mainly been using the MKVToolNix GUI.
    Image Attached Files
    Last edited by sailor420; 20th Jun 2021 at 18:03.
    Quote Quote  
  2. SOLVED:

    for %%f in (*.mkv) do %mkvmerge% -o "mkvmerge_out/%%~nf.mkv" --no-subtitles "%%f" ""    
    xcopy ".\mkvmerge_out\*.mkv" ".\*.mkv" /D /C /I /Y
    for %%f in (*.mkv) do %mkvmerge% @%mkvjsons%%jsonname%%jsonsext% -o "mkvmerge_out/%%~nf.mkv" --title "%%~nf" "%%~f"

    Having to dance the TWO STEP, best I could figure out, it's not pretty, but it works !!
    Quote Quote  

Similar Threads