![]() ![]() The string assigned to environment variable SubtitleOptions starts always with a space character if defined at all which is the reason why %SubtitleOptions% is directly after "%%I" on command line executing mkvmerge.exe.įor understanding the used commands and how they work, open a command prompt window, execute there the following commands, and read entirely all help pages displayed for each command very carefully. Please read this answer for details about the commands SETLOCAL and ENDLOCAL and single line with multiple commands using Windows batch file for an explanation of operator & used on command line with ENDLOCAL to set the variable SubtitleOptions in initial environment of the batch file with delayed expansion not enable to process correct also. Setlocal EnableExtensions DisableDelayedExpansionįor %%I in (*.srt) do set "SubtitleOptions=!SubtitleOptions! -language 0:%%~nI -default-track 0:no "%%I""Įndlocal & set "SubtitleOptions=%SubtitleOptions%"įor %%I in (*.mkv) do mkvmerge.exe -o "%%I" -default-track 0:yes "%%I"%SubtitleOptions% The batch file below creates the command line with variable number of -language and -default-track options depending on. I don't have installed mkvmerge.exe and I don't have read the documentation of mkvmerge and so don't know if the options provided in question are really correct. Las últimas versiones ahora tienen la capacidad de crear archivos compatibles con WebM. ![]() Hacen para Matroska lo que hacen las herramientas OGM para el formato OGM y, a continuación, algunas. Goal: Each !subtitle! should be correct language and subtitle, as I understand by alphabet. MKVToolnix es un conjunto de herramientas para crear, alterar e inspeccionar archivos de Matroska en Linux, otros Unices y Windows. It almost works except it picks up every subtitle as last variable, so from scenario 1 each subtitle is muxed three times and named as ger for language and ger.srt used as source all three times because it's last one in the list by alphabet. So far this is fixed amount of subtitles approach, not dynamic, so e.g. (Note that the MKVToolNix GUI free tool also does that very well. language 0:!subtitle! -default-track 0:no "!subtitle!.srt"^ The only workaround I found is passing a -k argument so that they are kept in separate. Mkvmerge.exe -o "%%~nA.mkv" -default-track 0:yes "%%A"^ So far we got here: EnableDelayedExpansion The goal is to everytime running the same batch file make it pick it up amount of subtitles and mux it correctly with correct language codes, etc. mkv file is needed to be muxed it comes with random amount of subtitles, and each subtitle is different language code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |