Let say one has the following task: One has two source folders, let say video1 and video2. In this both folders are video files with the same names, for example video1videoFile1.mp4 and video2videoFile1.mp4, video1videoFile2.mp4 and video2videoFile2.mp4 and so on. FFmpeg should use the video stream and all audio streams from the folder video1 of each video file and only one specific audio stream of each video file from the folder video2 and merge all used streams in one video file, for example result1.mkv. Concrete: video stream and all audio streams from video1videoFile1.mp4 and only one specific audio stream from video2videoFile1.mp4 have to be merge into result1.mkv, video stream and all audio streams from video1videoFile2.mp4 and only one specific audio stream from video2videoFile2.mp4 have to be merge into result2.mkv and so on. It should be done automatically (with Windows-CMD). Till now I have done the following
for /R "video1" %i in (*.mp4) do ffmpeg -i "%i"^
-i "video2/%i"^
-map 0:V^
-map 0:1^
-map 1:1^
-map 0:3^
-c:v libx265^
-crf 18^
-preset veryslow^
-pix_fmt yuv420p10le^
-c:a copy^
"%~ni".mkv
If I copy the above code into a Windows-CMD and type enter, then nothing happens. No error, no warning, nothing.
So, what I’am doing wrong?
Thank you for your help and effort in advance!