Hello
Is there any way to replace subtitle in mkvmerge?
i'm using this code to remove subtitle
How can i add another subtitle ( same name ) ?Code:@echo off cls set rootfolder=C:\1\ echo Enumerating all MKVs under %rootfolder% echo. for /r %rootfolder% %%a in (*.mkv) do ( for /f %%b in ('mkvmerge -i "%%a" ^| find /c /i "subtitles"') do ( if [%%b]==[0] ( echo "%%a" has no subtitles ) else ( echo. echo "%%a" has subtitles mkvmerge -q -o "%%~dpna (No Subs)%%~xa" -S "%%a" if errorlevel 1 ( echo Warnings/errors generated during remuxing, original file not deleted ) else ( del /f "%%a" echo Successfully remuxed to "%%~dpna (No Subs)%%~xa", original file deleted ) echo. ) ) )
I don't want to remux file again
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 5 of 5
Thread
-
-
What exactly do you mean by "same name"?
Giving an example, you have 2 files:
movie.mkv
subtitle.srt
Then removing the embed subtitles from movie.mkv while at the same time adding subtitle.srt is simply:
mkvmerge -o "output.mkv" -S "movie.mkv" "subtitle.srt"
So, if by "same name" you mean movie.mkv and movie.srt you just add "%%~dpna.srt" to the muxing command of your script:
Code:@echo off cls set rootfolder=C:\1\ echo Enumerating all MKVs under %rootfolder% echo. for /r %rootfolder% %%a in (*.mkv) do ( for /f %%b in ('mkvmerge -i "%%a" ^| find /c /i "subtitles"') do ( if [%%b]==[0] ( echo "%%a" has no subtitles ) else ( echo. echo "%%a" has subtitles mkvmerge -q -o "%%~dpna (No Subs)%%~xa" -S "%%a" "%%~dpna.srt" if errorlevel 1 ( echo Warnings/errors generated during remuxing, original file not deleted ) else ( del /f "%%a" echo Successfully remuxed to "%%~dpna (No Subs)%%~xa", original file deleted ) echo. ) ) )
Last edited by sneaker; 29th Mar 2016 at 14:52.
-
Hi Guys,
I realize this is a very old thread.
I have been using the script in #2 above for years and it always worked.
All I want to do is to remove the subtitles from all the MKV files in a folder.
It has been working perfectly.
Just the other day it stopped working.
I am seeing an error message:
HTML Code:'find' is not recognized as an internal or external command, operable program or batch file.
I don't remember changing anything in windows.
Does anyone know what could be wrong?
Similar Threads
-
MKVMERGE Batch Muxing multiple audio and subtitle tracks?
By jahob000 in forum Newbie / General discussionsReplies: 38Last Post: 30th May 2023, 20:13 -
Mkvmerge batch muxing with some custom attributes
By Pegla in forum Newbie / General discussionsReplies: 3Last Post: 13th Jan 2016, 02:26 -
[BATCH PROCESSING] how to replace CHOOSE.EXE in a batch routine?
By marcorocchini in forum Newbie / General discussionsReplies: 3Last Post: 10th Nov 2015, 04:33 -
Batch M4V to MKV? (MKVMerge)
By newoski in forum Newbie / General discussionsReplies: 2Last Post: 4th Dec 2013, 19:37 -
Batch subtitle muxing - mkvmerge
By mkr10001 in forum EditingReplies: 1Last Post: 18th Feb 2012, 13:03