commit | 47561c669013032e0cb531bba161c677dd534c3e | [log] [tgz] |
---|---|---|
author | zhouchensheng <chess99@126.com> | Fri May 21 07:37:52 2021 |
committer | zhouchensheng <chess99@126.com> | Fri May 21 07:37:52 2021 |
tree | c4dc337be04e143e72310d398c87ffa32a29b8a8 | |
parent | a9ab0f58902a3b20c6be64c373ba0b112e54cad9 [diff] |
Use universal_newlines instead of decode
Calculate visual performance metrics from a video (Speed Index, Perceptual Speed Index, Visual Complete, Incremental progress, etc). This is a command-line port of the WebPagetest mobile video processing and metrics code.
visualmetrics requires several image processing tools be installed and available in the path:
The dependencies can be verified by running:
$python visualmetrics.py --check ffmpeg: OK convert: OK compare: OK Pillow: OK SSIM: OK
$ python visualmetrics.py -h
$ python visualmetrics.py --video video.mp4 --dir frames -q 75 --histogram histograms.json.gz --orange --viewport First Visual Change: 1806 Last Visual Change: 1955 Visually Complete: 1955 Speed Index: 1835 Visual Progress: 0=0%, 1806=45%, 1827=48%, 1844=53%, 1861=99%, 1879=99%, 1901=98%, 1922=99%, 1938=99%, 1955=100%
$ python visualmetrics.py --video tests/data/lemons/video.mp4 --dir frames --histogram histograms.json.gz --orange --viewport First Visual Change: 768 Last Visual Change: 2884 Speed Index: 1840 Visual Progress: 0=0%, 768=23%, 785=24%, 1510=61%, 1545=61%, 1981=61%, 2015=61%, 2033=61%, 2069=61%, 2086=61%, 2105=61%, 2140=61%, 2175=61%, 2572=61%, 2589=61%, 2606=62%, 2623=62%, 2641=63%, 2658=57%, 2676=58%, 2694=58%, 2713=57%, 2731=58%, 2749=58%, 2770=89%, 2789=87%, 2809=87%, 2828=87%, 2884=100%
$ python visualmetrics.py --video tests/data/lemons/video.mp4 --dir frames --histogram histograms.json.gz --orange --viewport --perceptual First Visual Change: 768 Last Visual Change: 2884 Speed Index: 1840 Perceptual Speed Index: 892 Visual Progress: 0=0%, 768=23%, 785=24%, 1510=61%, 1545=61%, 1981=61%, 2015=61%, 2033=61%, 2069=61%, 2086=61%, 2105=61%, 2140=61%, 2175=61%, 2572=61%, 2589=61%, 2606=62%, 2623=62%, 2641=63%, 2658=57%, 2676=58%, 2694=58%, 2713=57%, 2731=58%, 2749=58%, 2770=89%, 2789=87%, 2809=87%, 2828=87%, 2884=100%