Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: To use this script, make a "_input" and "_output" folder within the same directory.
- :: Then, put the audio files in ".wav"-format together with a ".png"-image in the "_input" folder.
- :: The image needs to have the same name as the audio file.
- :: The output will be a ".mp4"-video within the "_output" folder. The name will be the same as the audio file.
- :: And yes, it loops through all the ".wav"-files within the "_input" folder.
- @echo off
- SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
- for %%f in (_input\*.wav) do (
- set "audio_file=_input\%%~nf.wav"
- set "cover_file=_input\%%~nf.png"
- set "output_file=_output\%%~nf.mp4"
- setlocal ENABLEDELAYEDEXPANSION
- ffmpeg -loop 1 -i "!cover_file!" -i "!audio_file!" -vf "scale=-2:720" -c:v libx264 -tune stillimage -c:a aac -strict experimental -b:a 320k -pix_fmt yuv420p -shortest "!output_file!"
- endlocal
- )
- ENDLOCAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement