edgarh92 / bitrate-viewer

Plots a graph showing the variation of the bitrate throughout your video.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bitrate-viewer

Fork and personalization of useful tool to learn from Plots a graph showing the variation of the bitrate as well as up to 75 I-Frames throughout your video. The average bitrate is shown on the legend. In addition to this, the minimum, maximum and standard deviation is shown above the graph. See the example below:

Example Graph

Requirements:

  • Python 3.6+
  • pip install -r requirements.txt
  • FFprobe in your PATH.

Usage

usage: main.py [-h] -i INPUT_VIDEO_PATH [-f {xml,json}]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT_VIDEO_PATH, --input-video-path INPUT_VIDEO_PATH
                        Enter the path of the input video. 
                        A relative or absolute path can bespecified.
  -f {xml,json}, --output-format {xml,json}
                        Specify the output format for the file written
                        by FFProbe. (default: 'xml')
  -csv {csv}, --csv-file DATA.CSV
                        Specify optional csv file to save avg, min, and max bitrate)

Example: python main.py -i video.mp4 -s data.csv -f json

This forces FFprobe to write its output in JSON (default is XML) and saves it as <video_file_name>.json. The graph will be saved as <video_file_name>.png.

Special thanks to @CrypticSignal for helping me along the way.

About

Plots a graph showing the variation of the bitrate throughout your video.

License:MIT License


Languages

Language:Python 100.0%