FFmpeg – merge videos to timelapse

How to Create a Timelapse Video from Multiple Clips Using FFmpeg (with GPU Acceleration!)

Do you have a folder full of video clips and want to create a smooth, fast-paced timelapse video from them—without expensive software? With FFmpeg, a free and powerful command-line tool, you can do just that.

In this post, we’ll cover:

  • How to merge multiple videos by filename
  • How to speed them up for a timelapse effect
  • When to use GPU vs CPU for faster processing

🛠️ What You Need

  • FFmpeg installed and added to your Windows PATH
  • A folder containing your video clips (ideally in .mp4 format)

🧩 Step 1: Open Command Prompt in Your Video Folder

Press Shift + Right Click inside the folder and choose “Open Command Window Here” or use cd to navigate there.


📦 Step 2: Create a List of Files in Order

Paste this command in Command Prompt to generate an input file list:

(for %F in (*.mp4) do @echo file '%F') > input.txt

✅ This creates a text file input.txt listing all .mp4 files by filename order.


🎬 Step 3: Merge & Speed Up for Timelapse

Now use this FFmpeg command to create the timelapse:

ffmpeg -f concat -safe 0 -i input.txt -filter:v "setpts=0.25*PTS" -an timelapse.mp4
  • setpts=0.25*PTS speeds up video by 4x
  • -an removes audio (optional)

You can tweak the speed by changing 0.25 to a different value (e.g., 0.1 for 10x speed).


⚡ Optional: Use Your GPU for Faster Encoding (NVIDIA Only)

If you have an NVIDIA GPU, you can significantly speed up the final encoding step using NVENC:

ffmpeg -f concat -safe 0 -i input.txt -filter:v "setpts=0.25*PTS" -c:v h264_nvenc -preset fast -b:v 5M -an timelapse.mp4
  • -c:v h264_nvenc uses NVIDIA’s encoder
  • Much faster than CPU-based encoding
  • Useful for 1080p and 4K output

💡 Not sure if you have NVENC support? Run ffmpeg -encoders | findstr nvenc in CMD.


🧠 CPU vs GPU: Which Is Faster?

TaskCPU (default)GPU (e.g., NVENC)
Concatenating videosFastSame
Speed-up filter (setpts)MediumStill CPU-bound
Final encodingSlowMuch faster with GPU

Use GPU if you’re working with large or high-resolution videos. For short or low-res clips, CPU is perfectly fine.

Buy Me a Coffee