Skip to content

Instantly share code, notes, and snippets.

@mitchellkrogza
Created May 25, 2023 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchellkrogza/3c833a9993837caf1eb92c20f56ad7d5 to your computer and use it in GitHub Desktop.
Save mitchellkrogza/3c833a9993837caf1eb92c20f56ad7d5 to your computer and use it in GitHub Desktop.
Windows Timelapse Making Script
This requires
- ffmpeg.exe binary on your desktop
- video input file named input.mp4
- audio file for timelapse called timelapsemusic.mp3
- your finished timelapse will be called MYTIMELAPSE.mp4
- change the username in cd C:\Users\Username\Desktop to your real username on windows
- Speed up or slow down the timelapse by changing the setpts=PTS/80 to a higher or lower value
- Example setpts=PTS/200 = very fast timelapse
- Example setpts=PTS/50 = slower timelapse
DO NOT COPY ANY OF THE ABOVE LINES INTO YOUR .bat file
COPY ONLY LINES BELOW and name the file maketimelapse.bat
cd C:\Users\Username\Desktop
echo "MAKE TIMELAPSE"
echo "--------------------------------"
echo "Copyright mitchellkrog@gmail.com"
echo "--------------------------------"
timeout 5 > NUL
echo "Speeding up Input Footage"
ffmpeg -i input.mp4 -filter:v "setpts=PTS/80" -y output.mp4
echo "Adding Audio Track"
ffmpeg -i output.mp4 -stream_loop -1 -i timelapsemusic.mp3 -shortest -map 0:v:0 -map 1:a:0 -y MYTIMELAPSE.mp4
del output2.mp4
del output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment