commit | 474fd0fb9a21840f7f3fc91beee895cc4d0253ba | [log] [tgz] |
---|---|---|
author | soulgalore <peter@soulgalore.com> | Wed Oct 18 07:06:09 2017 |
committer | soulgalore <peter@soulgalore.com> | Wed Oct 18 07:06:09 2017 |
tree | 86bb093b16d43d333c807c0ac759df3916386270 | |
parent | f4d6788bbed8c641620ba342580385ef13547b07 [diff] |
Create temporary dir that is unique for color images. If you don't set a working dir for images from the cli, ffmpeg overwrites the created color images.
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%