Advertisement
Lordmau5

Untitled

Apr 17th, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.87 KB | None | 0 0
  1. :: To use this script, make a "_input" and "_output" folder within the same directory.
  2. :: Then, put the audio files in ".wav"-format together with a ".png"-image in the "_input" folder.
  3. :: The image needs to have the same name as the audio file.
  4. :: The output will be a ".mp4"-video within the "_output" folder. The name will be the same as the audio file.
  5. :: And yes, it loops through all the ".wav"-files within the "_input" folder.
  6.  
  7. @echo off
  8. SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
  9. for %%f in (_input\*.wav) do (
  10.   set "audio_file=_input\%%~nf.wav"
  11.   set "cover_file=_input\%%~nf.png"
  12.   set "output_file=_output\%%~nf.mp4"
  13.   setlocal ENABLEDELAYEDEXPANSION
  14.     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!"
  15.   endlocal
  16. )
  17. ENDLOCAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement