Monday, October 27, 2025

How to Take Automatic Screenshots from Online Videos Using VLC Media Player on Ubuntu

 


Have you ever wanted to save automatic screenshots from YouTube or any online video?
In this guide, we’ll learn how to do that using VLC Media Player and the Ubuntu terminal — completely offline once downloaded.


⚠️ Disclaimer: This tutorial is for educational purposes only.
Please use it only for personal learning or fair-use research, not for re-uploading or redistributing copyrighted videos.


🧰 Step 1. Install VLC Media Player on Ubuntu

If you don’t already have VLC, install it using:

sudo apt install vlc -y

🔧 Step 2. Install the Latest yt-dlp

The default version from Ubuntu’s repository is often outdated, so let’s install the newest one manually:

sudo apt remove yt-dlp -y sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp sudo chmod a+rx /usr/local/bin/yt-dlp

🧩 Step 3. Refresh the Terminal Cache

Tell your shell to forget the old path:

hash -r

🔍 Step 4. Verify the Installation

Check that yt-dlp is now running from the correct location:

which yt-dlp

✅ Output should look like:

/usr/local/bin/yt-dlp

Then confirm the version:


🎬 Step 5. Download the Video and Capture Screenshots Automatically

Now you’re ready to download and generate screenshots every ~2 seconds automatically.

Replace id in the URL with your YouTube video’s ID, and username with your Linux username:

yt-dlp -o temp.mp4 "https://www.youtube.com/watch?v=id" \ && cvlc --video-filter=scene \ --scene-path=/home/username/createnewfolder \ --scene-prefix=ytshot \ --scene-format=png \ --scene-ratio=50 \ temp.mp4 vlc://quit

💡 How it works:

  • yt-dlp downloads the video (temp.mp4).

  • cvlc (VLC without interface) plays it silently.

  • --scene-filter takes a screenshot roughly every 2 seconds.

  • All images are saved to /home/username/createnewfolder/.


📂 Step 6. Check the Saved Screenshots

After the process finishes, open your screenshot folder:

xdg-open /home/username/ss

You’ll see images named like:

ytshot00001.png ytshot00002.png ytshot00003.png

VLC closes automatically once it finishes processing the video.


✅ Summary

You’ve successfully:

  1. Installed the latest yt-dlp.

  2. Downloaded a YouTube video safely.

  3. Used VLC to capture screenshots automatically.

This setup is great for studying tutorials, analyzing frames, or taking notes from educational videos — all without manually pausing or pressing “Print Screen.”

No comments:

Post a Comment

Understanding the Agentic Capabilities of Gemini 3 Pro

If you thought the jump from Gemini 1.5 to 2.5 was significant, Google’s latest release might just redefine your expectations entirely. Offi...