1+ [ ![ Build and Publish] ( https://github.com/wangyoucao577/plot-av/actions/workflows/build_publish.yml/badge.svg )] ( https://github.com/wangyoucao577/plot-av/actions/workflows/build_publish.yml ) [ ![ PyPI version] ( https://badge.fury.io/py/plot-av.svg )] ( https://badge.fury.io/py/plot-av )
2+
13# plot-av
24Plot details of Audio/Video streams of media files to help you gain better insights of them.
35
4-
56![ ] ( docs/images/plot-av.png )
67
78
89## Installation
910
10- ### Prerequisites
11- - Latest [ Python] ( https://www.python.org/downloads/ )
12- - [ pyav] ( https://pyav.org/docs/stable/ )
13- - [ matplotlib] ( https://matplotlib.org/ )
14-
15- ### Example installation via conda
16-
1711``` bash
18- # base python env
19- conda create -n pyav python=3.11
20- conda activate pyav
21-
22- # install pyav
23- conda install av -c conda-forge
24-
25- # install matplot
26- python -m pip install -U pip
27- python -m pip install -U matplotlib
12+ $ pip install plot-av
2813```
2914
3015## Usage
3116
3217``` bash
3318# basic use
34- $ python plot-av.py -i test.mp4
19+ $ plot-av -i test.mp4
3520
3621
3722# help
38- $ python plot-av.py -h
39- usage: plot-av.py [-h] -i INPUT [-vn | -a n | -map STREAMS_SELECTION] [--dpi DPI] [--plots PLOTS] [--interval INTERVAL] [--log LOGLEVEL]
23+ $ plot-av -h
24+ usage: plot-av [-h] -i INPUT [-vn | -a n | -map STREAMS_SELECTION] [--dpi DPI] [--plots PLOTS] [--interval INTERVAL] [--log LOGLEVEL]
4025
4126plot audio/video streams.
4227
@@ -48,8 +33,7 @@ options:
4833 -map STREAMS_SELECTION
4934 manually select streams, pattern ' input_index:stream_type:stream_index' , e.g. ' 0:v:0' , ' 0:a:0' (default: None)
5035 --dpi DPI resolution of the figure. If not provided, defaults to 100 by matplotlib. (default: None)
51- --plots PLOTS subplots to show, seperate by ' ,' . options: dts,pts,size,bitrate,fps,avsync,dts_delta,duration (default:
52- dts,pts,size,bitrate,fps,avsync,dts_delta,duration)
36+ --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)
5337 --interval INTERVAL calculation interval in seconds for statistics metrics, such as bitrate, fps, etc. (default: 1.0)
5438 --log LOGLEVEL log level (default: None)
5539` ` `
@@ -59,22 +43,22 @@ options:
5943- Draw your interested subplots only
6044
6145` ` ` bash
62- python plot-av.py -i test.mp4 --plots dts,pts
46+ $ plot-av -i test.mp4 --plots dts,pts
6347` ` `
6448
6549- Draw video or audio only
6650
6751` ` ` bash
6852# disable video
69- python plot-av.py -i test.mp4 -vn
53+ $ plot-av -i test.mp4 -vn
7054
7155# disable audio
72- python plot-av.py -i test.mp4 -an
56+ $ plot-av -i test.mp4 -an
7357` ` `
7458
7559- Manually select streams from mutiple inputs
7660
7761` ` ` bash
78- python plot-av.py -i test1.mp4 -i test2.mp4 -map 0:v:0 -map 1:a:0
62+ $ plot-av -i test1.mp4 -i test2.mp4 -map 0:v:0 -map 1:a:0
7963` ` `
8064
0 commit comments