Skip to content

Python Script for processing YouTube videos in Google Colab: download videos, split them into parts, extract frames, and select random files. Uses pytubefix, moviepy, cv2, and shutil.

Notifications You must be signed in to change notification settings

arabymo/Video-Processing-Pipeline

Repository files navigation

YouTube Video Processor

This project provides a pipeline for downloading YouTube videos, splitting them into equal parts, extracting frames, and performing various operations on the frames, such as annotating frame numbers and selecting random frames for further analysis.

Features

  1. Download Videos from YouTube: Utilizes the pytubefix library to download videos directly from YouTube.
  2. Split Videos into Equal Parts: The downloaded video is split into equal-length segments (4 segments by default).
  3. Extract Frames: All frames from each segment are extracted.
  4. Organize Frames: Each segment's frames are stored in a separate folder.
  5. Annotate Frames: Frame numbers are written directly onto each image using the cv2 library.
  6. Random Frame Selection: Selects 4 random frames from each folder for further processing or analysis.

Installation

  1. Clone the repository:
    git clone https://github.com/arabymo/Video-Processing-Pipeline.git
    cd Video-Processing-Pipeline
  2. Install the required dependencies:
    pip install -r requirements.txt
    

Random Frames Extracted

First Frame

frame_10084

Second Frame

frame_33377

Third Frame

frame_67634

Fourth Frame

frame_101005

About

Python Script for processing YouTube videos in Google Colab: download videos, split them into parts, extract frames, and select random files. Uses pytubefix, moviepy, cv2, and shutil.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published