I'm trying to loop, via batch file, through all my folders and, where subtitles are present, merge them into existing files.
Subtitles could be srt/sub/idx/etc., basically any format.
Most are English, but a few are other languages.
The video files could be MP4, MKV, AVI.
I don't want to "burn in" the subtitles, I just want them available.
I don't want to reencode any of the files, just add in the subtitles so I don't need the separate subtitle files.
I'd appreciate it someone could share the proper-syntax command line to do this.
I have the (however inelegant) framework (batch file), basically:
For /R %%A in (D:\Movies) Do (
If Exist %%~dpn.srt (
[awaiting HandbrakeCLI synax]
Del %%~dpn.srt
)
For /R %%B in ("%%~dpn.?_Eng.srt") Do (
[awaiting HandbrakeCLI synax]
Del %%B
)
If Exist %%~dpn.ITA.srt (
[awaiting HandbrakeCLI synax]
Del %%~dpn.srt
)
For /R %%B in ("%%~dpn.?_Ita.srt") Do (
[awaiting HandbrakeCLI synax]
Del %%B
)
If Exist %%~dpn.sub (
[awaiting HandbrakeCLI synax]
Del %%~dpn.srt
)
If Exist %%~dpn.idx (
[awaiting HandbrakeCLI synax]
Del %%~dpn.srt
)
[repeat for each subtitle format]
)
What I'm missing is a simple clear understanding of the CLI to only embed (but not "burn in") the subtitles, without otherwise re-encoding each file.
Appreciate your help in advance.
HandBrake version (e.g., 1.0.0):
1.2.2
Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 10
HandBrake Activity Log ***required*** (see How-to get an activity log)
N/A
Code: Select all
Please replace this text with the contents of your log file between the two code tags - OR - provide a pastebin URL in place of these 3 lines.