-
Batch process videos to thumbs (preserve filename, add actual time-stamp)
Using ffmpeg, I am writing a script to create thumbnails, at every 5 sec, from 100s of videos of different filetypes (.mp4, .mts, .avi, .wmv), all videos being in one folder. I am having trouble to figure out how to handle the thumbnail filenames, so (i) it preserves the video’s filename (without extension), yet (ii) appends with a __timestamp corresponding with the actual seconds of the thumbnails taken (e.g., __0005, __0010, __0015… up to __5400, in case of a 90 min video).
ffmpeg is installed: C:\ffmpeg
source videos' dir: C:\video
thumbnails to be placed: C:\thumbintended thumbnail filename output (e.g., from 2 videos):
video-1__0005.png or jpg
video-1__0010.png
video-1__0015.png
video-2__0005.png or jpg
video-2__0010.png
video-2__0015.png
video-2__0020.png
video-2__0025.pngcurrent script:
C:\video>ffmpeg -i video-1.mp4 -vf fps=0.2 C:\thumb\__%04d.pngWhat I am missing to have the intended filename output? (Either Command line or PowerShell solutions would be helpful.) Thank you!
Sorry, there were no replies found.