I want to bach merge videos with audio.
For one episode there are two qualities (HD and FHD) and one audio file.
All files have .mp4 extension.
The name pattern looks like this:
Is there a way to batch mux audio and video? I want to make sure that correct audio will be merged with video.001f_1920x1080 HD.mp4, 001_1280x720 HD.mp4, 001a_Spanish (es).mp4
002f_1920x1080 HD.mp4, 002_1280x720 HD.mp4, 002a_Spanish (es).mp4
003f_1920x1080 HD.mp4, 003_1280x720 HD.mp4, 003a_Spanish (es).mp4
+ Reply to Thread
Results 1 to 7 of 7
Last edited by m0ck; 5th Jul 2019 at 06:10.
SETLOCAL ENABLEDELAYEDEXPANSION for %%a in ("*(es).mp4") do ( set number=%%a ffmpeg -i "!number:~0,3!f_1920x1080 HD.mp4" -i "%%~a" -map 0:v -map 1:a -c copy "!number:~0,3!f_1920x1080 HD ES.mp4" ffmpeg -i "!number:~0,3!_1280x720 HD.mp4" -i "%%~a" -map 0:v -map 1:a -c copy "!number:~0,3!_1280x720 HD ES.mp4" )
Thanks, it seems to be working.
Is there an option to automatically delete video and audio files once merged successfully?
Can you provide a script if that's not a problem. I a noob with this stuff unfortunately.
Can someone help me write the code for the similar problem? Forgive me. I am a nobbie in this. I am learning to use ffmpeg.
I want to merge video 1 with audio 01, merge video 2 with audio 02.... Everything is in the mp4 form.
I use this:
ffmpeg -i 1.mp4 -i 01.mp4 -map 0 -map 1 -codec copy X01.mp4
ffmpeg -i 2.mp4 -i 02.mp4 -map 0 -map 1 -codec copy X02.mp4
ffmpeg -i 3.mp4 -i 03.mp4 -map 0 -map 1 -codec copy X03.mp4
It is working but I have to wait until one video is ready to make another...
How can I do this automatically?