Skip to content

Instantly share code, notes, and snippets.

@fabiorzfreitas
Created February 12, 2024 21:49
Show Gist options
  • Save fabiorzfreitas/2474e0be3ad2cb510adf71fd38342cd7 to your computer and use it in GitHub Desktop.
Save fabiorzfreitas/2474e0be3ad2cb510adf71fd38342cd7 to your computer and use it in GitHub Desktop.
Creates 3x3 thumbnails preview
(
for %%f in (
*.mp4 *.mkv *.mov *.3gp
) do (
for /f %%g in (
'ffprobe -v error -select_streams v:0 -count_packets -show_entries stream^=nb_read_packets -of default^=nk^=1:nw^=1 "%%f"'
) do (
ffmpeg -y -i "%%f" -filter_complex "select='not(mod(n,floor(%%g/9)))',tile=layout=3x3" -update 1 -frames:v 1 "%%f.png"
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment