Plot Audio/Video streams for better insights
Project description
plot-av
Plot details of Audio/Video streams of media files to help you gain better insights of them.
Installation
Prerequisites
- Latest Python
- pyav
- matplotlib
Example installation via conda
# base python env
conda create -n pyav python=3.11
conda activate pyav
# install pyav
conda install av -c conda-forge
# install matplot
python -m pip install -U pip
python -m pip install -U matplotlib
Usage
# basic use
$ python plot-av.py -i test.mp4
# help
$ python plot-av.py -h
usage: plot-av.py [-h] -i INPUT [-vn | -an | -map STREAMS_SELECTION] [--dpi DPI] [--plots PLOTS] [--interval INTERVAL] [--log LOGLEVEL]
plot audio/video streams.
options:
-h, --help show this help message and exit
-i INPUT input file url (default: None)
-vn disable video stream (default: False)
-an disable audio stream (default: False)
-map STREAMS_SELECTION
manually select streams, pattern 'input_index:stream_type:stream_index', e.g. '0:v:0', '0:a:0' (default: None)
--dpi DPI resolution of the figure. If not provided, defaults to 100 by matplotlib. (default: None)
--plots PLOTS subplots to show, seperate by ','. options: dts,pts,size,bitrate,fps,avsync,dts_delta,duration (default:
dts,pts,size,bitrate,fps,avsync,dts_delta,duration)
--interval INTERVAL calculation interval in seconds for statistics metrics, such as bitrate, fps, etc. (default: 1.0)
--log LOGLEVEL log level (default: None)
More examples
- Draw your interested subplots only
python plot-av.py -i test.mp4 --plots dts,pts
- Draw video or audio only
# disable video
python plot-av.py -i test.mp4 -vn
# disable audio
python plot-av.py -i test.mp4 -an
- Manually select streams from mutiple inputs
python plot-av.py -i test1.mp4 -i test2.mp4 -map 0:v:0 -map 1:a:0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plot_av-0.1.2.tar.gz
(122.8 kB
view details)
Built Distribution
plot_av-0.1.2-py3-none-any.whl
(16.3 kB
view details)
File details
Details for the file plot_av-0.1.2.tar.gz
.
File metadata
- Download URL: plot_av-0.1.2.tar.gz
- Upload date:
- Size: 122.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf5278138879c099b2065c37dd53150282d22a65dc5004b199f247f64bf2975b |
|
MD5 | 5ae88218295c74e54ca1bd92e4679104 |
|
BLAKE2b-256 | 651fb05eed7b36348167f8155482e5a83124ddb8f0e4e4cfdeb067d2046c37bb |
File details
Details for the file plot_av-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: plot_av-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b6361b5fd7d566ade703e20b561c987e8ec9f1e849fff1deecc1df678f73031 |
|
MD5 | 37b4f707b3930506f81b41b0e35e0e66 |
|
BLAKE2b-256 | aa8e177876603a8d0800d9bca12134d649df42d81a71beb0533325c7781d7c19 |