Last active
December 17, 2017 15:17
-
-
Save ELC/d509fb3dd9ba33b8acb85dbc24f65422 to your computer and use it in GitHub Desktop.
Create video for YouTube with still image from folder - MSDOS - BATCH - Windows - FFMPEG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM This program assumes that all your audio files are OGG and all your images are PNG (Suggested dimensions: 1280x720 or 1920x1080) | |
REM In case you have mixed formats, please convert all to one, if you use a different format, edit this file and change the format. | |
REM The output will be in MKV format, you can also change this but the configuration may not be optimal for other formats | |
REM The resulting video will have quality options as high as the image resolution | |
REM IMPORTANT: LOW QUALITY IMAGES MAY DECREASE THE QUALITY OF THE AUDIO WHEN UPLOADED TO YOUTUBE | |
ECHO Make sure to read the comments before executing the script. | |
PAUSE | |
SET audio=ogg | |
SET image=png | |
SET video=mkv | |
FOR %%f IN (*.ogg) DO ( | |
ECHO Creating video using %%~nf.%audio% and %%~nf.%image% | |
ffmpeg -loop 1 -framerate 2 -i "%%~nf.%image%" -i "%%~nf.%audio%" -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p "%%~nf.%video%" | |
) | |
ECHO All the files where processed | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment