Drag'n'drop to compress video using ffmpeg

Written by pmd - - no comments

1. Download ffmpeg

Link to download ffmpeg: https://github.com/BtbN/FFmpeg-Builds/releases

2. Create a *.bat file

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
FOR %%A IN (%*) DO (
    ECHO %%A
    SET input=%%A
    ECHO !input!
    SET "output=!input!.compressed.mp4"
    ECHO !output!
    "C:\_d\Outils Alstom\ffmpeg-master-latest-win64-gpl\bin\ffmpeg" -y -i !input! -vcodec h264 -acodec mp3 !output!
)
pause
RET  OTHER THING YOU COULD PUT IN THE COMMAND LINE:
RET  ----------------------------------------------
RET  TO CHANGE OUTPUT RESOLUTION to 1080p (HD) =>  -s "1920x1080"
RET                              to  720p (HD) =>  -s "1280x720"
RET                              to  480p (SD) =>  -s "854x480"
RET                              to  360p (SD) =>  -s "640x360"
RET                              to  240p (SD) =>  -s "426x240"
RET  
RET  TO KEEP ONLY SOME TIME (HH:mm:ss)         =>  -ss 00:00:20 -to 00:00:40
RET  
RET 

Discussion about ffmpeg command line to use: Compress mp4 using FFMPEG · GitHub

Setting a variable into a for loop (batch)

3. Create a shortcut on Desktop and drag'n'drop

It will create a new file in same path than the video you want to compress with following name: "original_file_name.extension.compressed.mp4".
You can drag'n'drop several files.

 

Rss feed of the articles