Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques Batch process videos to thumbs (preserve filename, add actual time-stamp)

  • Batch process videos to thumbs (preserve filename, add actual time-stamp)

    Posted by Lopici Gaspar on October 8, 2017 at 8:25 pm

    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:\thumb

    intended 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.png

    current script:

    C:\video>ffmpeg -i video-1.mp4 -vf fps=0.2 C:\thumb\__%04d.png

    What I am missing to have the intended filename output? (Either Command line or PowerShell solutions would be helpful.) Thank you!

    Lopici Gaspar replied 8 years, 7 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy