At present the goal is to:
—————
Filebot correctly renames the file via AMC.
- demux the file, so audio streams and video streams can be selected specifically.
- Remux with only selected audio stream (English), set English Audio track as the first and only audio stream. Copy the video stream without modifying it. Remux to .MKv file and output to different folder.
-Retitle remux to match the file name and save.
————————-
##The code found to do this##
batch: Select all
@echo off
if not exist NEW\*.* md NEW
if exist temp\*.* (del /q temp\*.*) else md temp
for %%a in ("*.mkv") do call :Process "%%a"
goto :end
:Process
:: Set the first stream, normally the video, to English. (In case it's not English.)
ffmpeg -i "%~1" -vcodec copy -acodec copy -metadata:s:0 language=eng -y "temp\%~1"
:: Copy the English streams (video+audio) to a new video.
ffmpeg -i "temp\%~1" -vcodec copy -acodec copy -map 0:m:language:eng -y "NEW\%~1"
goto :eof
:end
rd /s /q temp