Right now, I am trying to retrieve or access some files:

example.mkv           // This is the source with audio/subs
example-Encoded.mkv   // This is video only/encoded source

I have created a script that is functioning properly, but it encounters an error when attempting to retrieve additional files after successfully obtaining the first two. The script completes the remuxing process, but the error occurs because it is searching for a file named “example-Encoded-Encode.mkv”.

Below is the script I am currently utilizing:

mkdir MUXED

FOR %%a IN ("*.mkv") DO ffmpeg -i "%%a" -i "%%~na-Encoded.mkv" ^
-map 1:v:0 c:v:0 copy -disposition:v:0 default -metadata:s:v:0 title="Example" ^
-map 0:a:0 -c:a:0 copy -disposition:a:0 default -metadata:s:a:0 title="DD 2.0" ^
-map 0:a:1 -c:a:1 copy -metadata:s:s:0 title="Commentary" ^
-map 0:s:0 -c:s:0 copy -metadata:s:s:0 title="English (SRT)" ^
-map 0:s:1 -c:s:1 copy -metadata:s:s:1 title="English (VobSub)" ^


I have the option of using the same file names by transforming the encoded video files into an mp4 container. Since the files are solely encoded video, this is achievable. Nonetheless, I have a sense that there might be a more suitable method to accomplish this without having to modify the containers beforehand.

Askify Moderator Edited question April 24, 2023