commit | 660749d9669b65c10c9033defdf9d65ddce435ea | [log] [tgz] |
---|---|---|
author | Patrick Meenan <pmeenan@chromium.org> | Sat Oct 06 18:14:09 2018 |
committer | Patrick Meenan <pmeenan@chromium.org> | Sat Oct 06 18:14:09 2018 |
tree | a9f46bdd30e0069c0ddee1d5540b8e6b146ff329 | |
parent | bd946b161afc267826e6095368a2cc8b2f554042 [diff] |
Make sure the margins are not smaller than the defaults
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%