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 details)

Uploaded Python 3

File details

Details for the file get_video_properties-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: get_video_properties-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 45.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for get_video_properties-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04d4f478a5211917e2a7e87ddfcb1c17734cddf8374494c3993bf825b7ad4192
MD5 ee2ec61177f833af2a1290c82d75e347
BLAKE2b-256 a6a778f3de52ff5a6a1998d7656f2a07456cb998b82c3ba5cc75c8bb1014f7b6

See more details on using hashes here.

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