Skip to content

Commit eb2dd4c

Browse files
committed
doc: update
1 parent 7a97b1f commit eb2dd4c

File tree

2 files changed

+38
-27
lines changed

2 files changed

+38
-27
lines changed

README.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,27 @@
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
24
Plot 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 | -an | -map STREAMS_SELECTION] [--dpi DPI] [--plots PLOTS] [--interval INTERVAL] [--log LOGLEVEL]
23+
$ plot-av -h
24+
usage: plot-av [-h] -i INPUT [-vn | -an | -map STREAMS_SELECTION] [--dpi DPI] [--plots PLOTS] [--interval INTERVAL] [--log LOGLEVEL]
4025

4126
plot 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

docs/development.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Development
2+
3+
## Prerequisites
4+
- Latest [Python](https://www.python.org/downloads/)
5+
- [pyav](https://pyav.org/docs/stable/)
6+
- [matplotlib](https://matplotlib.org/)
7+
8+
## Example installation via conda
9+
10+
```bash
11+
# base python env
12+
conda create -n pyav python=3.11
13+
conda activate pyav
14+
15+
# install pyav
16+
conda install av -c conda-forge
17+
18+
# install matplot
19+
python -m pip install -U pip
20+
python -m pip install -U matplotlib
21+
```
22+
23+
## Usage
24+
25+
```bash
26+
$ python -m plot_av.plot_av -h
27+
```

0 commit comments

Comments
 (0)