Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem A windows build of FFmpeg must be copied in the same directory or set in the PATH
- rem Please check the official FFmpeg website to obtain a static build (https://www.ffmpeg.org/download.html#build-windows)
- cd %~dp0
- if not exist convert (mkdir convert)
- :ips
- rem Get the frame per second variable, loops until it is defined
- SET /P ips="Indiquer le nombre d'images par seconde … extraire (autour de 15, maximum 25)"
- IF NOT DEFINED ips GOTO :ips
- rem Ask if the final images must be resized using FFmpeg presets. The preset name must be typed (ie: sqcif)
- rem Useful to convert HD stuff into animated GIF
- CHOICE /C ON /T 10 /D N /M "Souhaitez-vous redimensionner les images ? (Valeur par d‚faut : N)"
- IF ERRORLEVEL 2 (
- GOTO orig
- ) ELSE (
- GOTO reso
- )
- GOTO end
- :orig
- FOR %%A IN (%*) DO (ffmpeg -i %%A -r %ips% -f image2 convert/%%~nA-%%3d.png)
- GOTO end
- :reso
- @echo ______________________________________________________
- @echo.
- @echo sqcif 128x96 qcif 176x144 cif 352x288
- @echo 4cif 704x576 qqvga 160x120 qvga 320x240
- @echo vga 640x480 svga 800x600 xga 1024x768
- @echo uxga 1600x1200 qxga 2048x1536 sxga 1280x1024
- @echo qsxga 2560x2048 hsxga 5120x4096 wvga 852x480
- @echo wxga 1366x768 wsxga 1600x1024 wuxga 1920x1200
- @echo woxga 2560x1600 wqsxga 3200x2048 wquxga 3840x2400
- @echo whsxga 6400x4096 whuxga 7680x4800 cga 320x200
- @echo hd480 852x480 hd720 1280x720 hd1080 1920x1080
- @echo ______________________________________________________
- @echo.
- rem
- SET /P res="Indiquer la r‚solution finale souhait‚e"
- FOR %%A IN (%*) DO (ffmpeg -i %%A -r %ips% -s %res% -f image2 convert/%%~nA-%%3d.png)
- GOTO end
- :end
- @echo.
- @echo.
- @echo Script bas‚ sur "FFmpeg" de Fabrice Bellard
- @echo https://www.ffmpeg.org/
- @echo.
- @echo.
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement