Skip to content

Convert a video to frames using Python with OpenCV. Capture frames at a fixed interval, saving each as a JPEG image. Prompt users for input video file and output directory, ensuring their existence. The code efficiently extracts frames, offering a simple and customizable solution for video-to-frame conversion.

Notifications You must be signed in to change notification settings

Sh-bharat/Vedio_to_Frames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Vedio_to_Frames.py

Overview

Vedio_to_Frames.py is a Python script created by Bharat Sharma (23MDT1051) for extracting frames from a video. This README provides information on the script's requirements and implementation.

Requirements

  1. Python: Ensure Python is installed on your system.

  2. OpenCV: Install the OpenCV library using the following command:

    pip install opencv-python
    

Usage

  1. Clone the Repository:

    git clone https://github.com/Sh-bharat/Vedio_to_Frames.git
    cd Vedio_to_Frames
    
  2. Run the Script:

    python Vedio_to_Frames.py
    
  3. Follow the Prompts:

    • Enter the path to the input video file.
    • Enter the path to the output directory.
  4. Review Output:

    • The script will create frames from the video at a specified interval and save them in the specified output directory.

Example

Enter the path to the input video file: path/to/input/video.mp4
Enter the path to the output directory: path/to/output/directory
Created output directory: path/to/output/directory
Saved frame 0 to path/to/output/directory/frame0.jpg
Saved frame 1 to path/to/output/directory/frame1.jpg
...

Author

Bharat Sharma

About

Convert a video to frames using Python with OpenCV. Capture frames at a fixed interval, saving each as a JPEG image. Prompt users for input video file and output directory, ensuring their existence. The code efficiently extracts frames, offering a simple and customizable solution for video-to-frame conversion.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages