Skip to content

Instantly share code, notes, and snippets.

@aleksas
Last active December 3, 2018 13:29
Show Gist options
  • Save aleksas/75ca37cb1beef8f0d83f95fd02a0c963 to your computer and use it in GitHub Desktop.
Save aleksas/75ca37cb1beef8f0d83f95fd02a0c963 to your computer and use it in GitHub Desktop.
Batch script to make a video from image and audio file using one line of ffmpeg
@echo off
pushd %~dp0
set image_path="%CD%\BACKGROUND_IMAGE.jpg"
set output_video_path="%~dpn1.mp4"
echo "PREPARING OUTPUT: %output_video_path%"
ffmpeg -loop 1 -i "%image_path%" -i "%~1" -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest "%output_video_path%"
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment