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

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page