mextractor can extract media metadata to YAML and read them
Project description
mextractor: media metadata extractor
Videos and images can be large.
Installation
Download and install from PyPi with pip
:
pip install mextractor
Usage
Extract and dump metadata
Video
from mextractor.workflow import extract_and_dump_video
metadata = extract_and_dump_video(dump_dir, path_to_video, include_image, greyscale, lossy_compress_image)
Image
from mextractor.workflow import extract_and_dump_image
metadata = extract_and_dump_image(dump_dir, path_to_image, include_image, greyscale, lossy_compress_image)
Load media
Video
import mextractor
video_metadata = mextractor.load(mextractor_dir)
print(video_metadata.average_fps)
print(video_metadata.frames)
print(video_metadata.resolution)
print(video_metadata.video_length_in_seconds)
Image
import mextractor
image_metadata = mextractor.load(mextractor_dir)
print(image_metadata.resolution)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mextractor-2.0.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for mextractor-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7e74c0ae6f90d3367edccc71a02f4fa7b337fed8e80078daf39b4bcd722e0e3 |
|
MD5 | 935df18decb518b95f850a4dc4115b14 |
|
BLAKE2b-256 | a39d09f6f0b6ac3001cd4325c6ab802d4e3592d9f8a820d3d25277809a27be64 |