Skip to main content

convert a video file or multiple video files in a directory into a series of image frames

Project description

mp42frame.py

This Python script, mp42frame.py, is used to convert a video file or multiple video files in a directory into a series of image frames.

Dependencies

  • OpenCV (cv2)
  • sys
  • os
  • glob

Usage

  1. For a single video file:

    pip install mp42frame
    
  2. For a single video file:

    mp42frame <video_file.mp4>
    

    This will create a new directory with the same name as the video file (without the '.mp4' extension) and save the extracted frames as JPEG files in this directory.

  3. For multiple video files in a directory:

    mp42frame <directory_path>
    

    This will process all '.mp4' files in the specified directory. For each video file, a new directory will be created with the same name as the video file (without the '.mp4' extension) and the extracted frames will be saved as JPEG files in these directories.

Note

  • The script will exit if no argument is provided.
  • The frames are saved as 'frame_n.jpg', where 'n' is the frame number.
  • The script will stop if the 'Escape' key is hit during the frame extraction process.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mp42frame-0.0.11.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

mp42frame-0.0.11-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file mp42frame-0.0.11.tar.gz.

File metadata

  • Download URL: mp42frame-0.0.11.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.6.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.0

File hashes

Hashes for mp42frame-0.0.11.tar.gz
Algorithm Hash digest
SHA256 b174ec9ba37e9b5cb32fd616190637669997eca906ae1e0559d82b8d64b7707f
MD5 233cab2e8aa4b01893c6c36011b93ca7
BLAKE2b-256 fc55e927d7b534f3adbdf26e3cb3804d5691d735b76f13130cc9e93e5af3f759

See more details on using hashes here.

Provenance

File details

Details for the file mp42frame-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: mp42frame-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.6.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.0

File hashes

Hashes for mp42frame-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 2bfd8981d038261ed1d2de4a3ab2625392aadaa688d0cf55a6d433542086c51b
MD5 212c225fd942fba0010f8c4188464906
BLAKE2b-256 66a027918e603d61a8d0a6a64bec93c8dff5451e5bf41417146e24e2b376a941

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page