Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
The Server Admin
The Server Admin
  • Home
  • Linux
  • Windows
  • About
  • What Powers The Server Admin
  • Home
  • Linux
  • Windows
  • About
  • What Powers The Server Admin
Close

Search

  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Subscribe
Linux

Generate Thumbnails for All Videos Inside Folder with FFmpeg

By Anthony
November 9, 2024 2 Min Read
0

When we are working with video sites, we often need to create our thumbnails, and often enough this happens to be in a folder with dozens if not more videos in it. The “old” or current process is to open that video, pause it in your video player, and take a screenshot. While not a huge issue if your doing a video or two, but once you get above that, well it becomes a pain. What if we can automate this process? Enter FFmpeg, the standard for internet video, were pretty much all video is based from.

In this example, I have a dozen or so videos I want to make thumbnails for.

So how to we take these 17 videos I have here, and automate this process? Well pretty easy,

Navigate to the folder in question and then just run the following command.

for f in *.mp4; do ffmpeg -i "$f" -ss 00:01:00 -vframes 1 "${f%.mp4}.jpg"; done

The above command does the following.

for f in *.mp4 -> In the folder look for all files with a mp4 extension.
do ffmpeg -i “$f -> Look over those mp4 files and then.
-ss 00:01:00 -vframes 1 -> Grab the frame at the 1 Minute Mark.
${f%.mp4}.jpg” -> Grab this from every file, and then name the new file matching the old file, but change the mp4 to jpg.

Now after we do this, it will loop over the directory and create your thumbs. Now please note that for every file, it must open it, jump to the 1 minute mark, take a screenshot, save the new file, and close the video. For me with an i7 still took about 3/5 seconds a video. So this is not an instant process, but if you have hundreds of videos to process, this will take hours if not days off your time.

As you can see, it created the new images and all it working!

Hope this helps you out with some of your thumbnail creation needs!!

Author

Anthony

Follow Me
Other Articles
Previous

Copy SSH Keys to Linux Host From Windows

Next

How to Install Plex in Ubuntu

Search

Need a Virtual Server for sysctl testing? Check out our plans!

Popular Posts

  • Mount sFTP folder as local drive
    by Anthony
    June 9, 2026
  • Robocopy Examples
    by Anthony
    February 12, 2026
  • Rsync Command Examples
    by Anthony
    February 10, 2026

Trending

  • Mount sFTP folder as local drive
    by Anthony
    June 9, 2026
  • Adding a GUI to a Server or VPS
    by Anthony
    August 27, 2024
  • Back up to a shared folder with Time Machine on Mac
    by Anthony
    January 4, 2025
  • Backup Your Databases
    by Anthony
    March 24, 2024

Editors Picks

    Send an email:
    mail@example.com

    Call me:
    123-456-7890

    • Facebook
    • Twitter
    • Instagram
    • TikTok
    • LinkedIn
    • Behance
    Copyright 2026 — The Server Admin. All rights reserved. Blogsy WordPress Theme