Skip to content

Instantly share code, notes, and snippets.

@mattiasghodsian
Created April 15, 2024 22:15
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 mattiasghodsian/26e4d3a70e2df1b82082a0869ff02053 to your computer and use it in GitHub Desktop.
Save mattiasghodsian/26e4d3a70e2df1b82082a0869ff02053 to your computer and use it in GitHub Desktop.
[PowerShell] Thumbnail Grid Generator with ffmpeg
# Author: Mattias Ghodsian
# Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
# Donate coffee: https://www.buymeacoffee.com/mattiasghodsian
$ffmpeg = ".\ffmpeg.exe"
$directory = $PWD.Path
$video = ".\video.mkv"
$filenameWithExtension = Split-Path -Leaf $video
# Specify the starting time offset
$startTime = "00:00:05"
# Run ffmpeg command to extract frames starting from 5 seconds into the video
& $ffmpeg -ss $startTime -i $video -frames:v 1 -vf "select=not(mod(n\,1000)),scale=-1:480,tile=3x3" out_%03d.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment