anyone know can I make the video flip horizontal using batch file?
here my batch file code that I have tried :
@echo off
ffmpeg -i "1.mp4" -vf hflip -i audio1.mp3 -map 0:v -map 1:a -c:v copy -shortest "C:\Users\Admin\Desktop\Replaced Mp3\1.mp4"
pause
Minimally, your code should be:
ffmpeg -i "input.mp4" -i "input.mp3" -vf hflip -map 0:v -map 1:a -shortest "output.mp4"
Note the order of where the video filter goes. -vf
goes after the audio input in this code.
You can of course add your desired -c:v
to something like libx264
or similar, and add other parameters such as bitrates etc.
Here's how I would flip all MP4 videos in a folder and output it in a different folder in with a batch file from Windows 11, the full path were cut
for %%a in ("C:\Users\A-User-Name\Documents\movies\*.mp4") DO ffmpeg -i "%%a" -vf hflip -c:a copy "C:\Users\A-User-Name\Documents\movies\output\%%~na_hflip.mp4"
Note that for each and every input mp4, the output file name will be concatenated with "_hflip", which is achived using %%~na_hflip.mp4
I will save the above command in a .bat file and run it and it Work like a charm every time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With