Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mvasilkov/python-get-video-properties
Get video properties
https://github.com/mvasilkov/python-get-video-properties
ffmpeg ffprobe python video video-properties
Last synced: 4 months ago
JSON representation
Get video properties
- Host: GitHub
- URL: https://github.com/mvasilkov/python-get-video-properties
- Owner: mvasilkov
- License: mit
- Created: 2018-02-19T14:31:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T03:58:40.000Z (about 1 year ago)
- Last Synced: 2024-09-30T23:46:08.172Z (4 months ago)
- Topics: ffmpeg, ffprobe, python, video, video-properties
- Language: Python
- Homepage:
- Size: 81.4 MB
- Stars: 20
- Watchers: 3
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
python-get-video-properties
===Get video properties
Installation
---```sh
pip install -U get-video-properties
```Usage
---```python
from videoprops import get_video_propertiesprops = 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**
```text
Codec: h264
Resolution: 1920×1080
Aspect ratio: 16:9
Frame rate: 25/1
```Usage (audio)
---```python
from videoprops import get_audio_propertiesprops = get_audio_properties('movie.mp4')
print(f'''
Codec: {props['codec_name']}
Channels: {props['channels']}
Sample rate: {props['sample_rate']}
''')
```**Sample output**
```text
Codec: opus
Channels: 2
Sample rate: 48000
```Command-line usage
---```sh
videoprops movie.mp4
audioprops movie.mp4
```