Skip to main content

Get video properties

Project description

python-get-video-properties

Get video properties

Installation

pip install -U get-video-properties

Usage

from videoprops import get_video_properties

props = get_video_properties('movie.mp4')

print(f'''
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')

print(f'''
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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

get_video_properties-0.1.1-py3-none-any.whl (45.1 MB view hashes)

Uploaded Python 3

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