Science Score: 31.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary

Keywords

fps video-frame-extraction video-frames video-processing
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: Yucheng0208
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 18.6 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
fps video-frame-extraction video-frames video-processing
Created about 1 year ago · Last pushed 11 months ago
Metadata Files
Readme License Citation

README.md

Video Frame Extractor

Overview

This Python script extracts frames from video files at a specified frame rate (FPS) and saves them in the desired image format (.jpg, .jpeg, .png, .tif). The script can be run interactively or with command-line parameters.

Features

  • Supports multiple video formats (.mp4, .avi, .mov, .mkv).
  • Allows users to specify the desired FPS for frame extraction.
  • Supports multiple output image formats (.jpg, .jpeg, .png, .tif).
  • Provides an interactive prompt if no command-line arguments are given.
  • Uses tqdm for progress tracking.

Requirements

Ensure you have the following dependencies installed: bash pip install opencv-python tqdm

Usage

Run with Interactive Mode

Run the script using Python: bash python Video-Frame-Extractor.py The script will prompt for: - Input directory: The directory containing video files. - Output directory: The directory where extracted frames will be saved. - Desired FPS: The frame rate for extraction. - Output Image Format: Users can choose between .jpg, .jpeg, .png, .tif.

Run with Command-Line Parameters

Alternatively, users can provide all parameters in one command: bash python Video-Frame-Extractor.py --input_dir path/to/videos --output_dir path/to/output --fps 5 --img_format jpg

Example

  1. Assume the following directory structure before running the script: /videos ├── video1.mp4 ├── video2.avi
  2. Running the script interactively and providing the /videos directory as input and /frames as output: Enter the input directory containing videos: /videos Enter the output directory for extracted frames: /frames Enter the desired frames per second (FPS): 5 Select the output image format: 1: jpg 2: jpeg 3: png 4: tif Enter the format number: 1
  3. The extracted frames will be saved in: /frames ├── video1 │ ├── frame_0000.jpg │ ├── frame_0001.jpg ├── video2 ├── frame_0000.jpg ├── frame_0001.jpg

Code Functionality

  1. Reads video files from the input directory.
  2. Extracts frames at the specified FPS.
  3. Saves frames in the user-specified image format.
  4. Uses tqdm to display a progress bar.
  5. Handles both interactive and command-line executions.

LICENSE

This project is licensed under the MIT License.

Owner

  • Name: Yu-Cheng Chang
  • Login: Yucheng0208
  • Kind: user
  • Location: Taiwan
  • Company: @H-C-Studio @TSVS-Special-Topic-Group

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Chang"
  given-names: "Yu-Cheng"
  orcid: "https://orcid.org/0000-0003-1301-9192"
title: "Video-Frame-Extractor"
license: MIT
version: 1.0.0
doi: 10.5281/zenodo.1234
date-released: 2025-04-08
url: "https://github.com/Yucheng0208/Video-Frame-Extractor"

GitHub Events

Total
  • Watch event: 1
  • Push event: 9
  • Create event: 2
Last Year
  • Watch event: 1
  • Push event: 9
  • Create event: 2