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 installation:

    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.12.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mp42frame-0.0.12.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.12.tar.gz
Algorithm Hash digest
SHA256 5a7ce243192965d28949452aa6466caf32a6856b3ab3207c465637f190022869
MD5 ed58dbedc49cbfd722a5359064b6ab8d
BLAKE2b-256 8616d1952e1679e247b8fb5bda1561869bbe76a95fe9c3c03226982a71374ebf

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mp42frame-0.0.12-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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 cba538f8bbd4fd874a5f28d9172b0f74d6293b98d7da9a4f782c5b50fcb4bed8
MD5 b8ef4bcbc8e4d4d71581f2e326cafa46
BLAKE2b-256 860e86d4cb8cee9c6b6f20d66d5fc94b83e3cb3deda0687134a7e30776a3a9da

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