Skip to main content

Get video properties

Project description


Get video properties


pip install -U get-video-properties


from videoprops import get_video_properties

props = get_video_properties('movie.mp4')

Codec: {props['codec_name']}
Resolution: {props['width']}×{props['height']}
Aspect ratio: {props['display_aspect_ratio']}
Frame rate: {props['avg_frame_rate']}

Sample output

Codec: h264
Resolution: 1920×1080
Aspect ratio: 16:9
Frame rate: 25/1

Usage (audio)

from videoprops import get_audio_properties

props = get_audio_properties('movie.mp4')

Codec: {props['codec_name']}
Channels: {props['channels']}
Sample rate: {props['sample_rate']}

Sample output

Codec: opus
Channels: 2
Sample rate: 48000

Command-line usage

videoprops movie.mp4
audioprops movie.mp4

Project details

Download files

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

Files for get-video-properties, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size get_video_properties-0.1.1-py3-none-any.whl (45.1 MB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page