Skip to main content

A simple test for detecting video latency

Project description

video-latency-test

This project provides software for a simple video latency test, utilizing the Linux framebuffer for video output and OpenCV for camera capture.

CircleCI codecov

Usage

Run video-latency-test from the commandline.

root@raspberrypi4-64:~# video-latency-test -h
usage: video-latency-test [-h] [--frames FRAMES] [--hue HUE] [--csv CSV]
                          output_fb cv2_cap

Run a video latency test

positional arguments:
  output_fb        The name of the framebuffer to use, e.g. fb0
  cv2_cap          Index of the cv2 capture device, e.g. 0

optional arguments:
  -h, --help       show this help message and exit
  --frames FRAMES  Number of frames to capture for the test
  --hue HUE        Hue threshold (uses hue values of 0-180)
  --csv CSV        Location to save a CSV log of captured data

Implementation

The video-latency-test executable accepts a VideoOutputInterface object, and a VideoCapture object, then measures the latency between setting a color on the VideoOutputInterface and detecting that color on the VideoCaptureInterface. The base implementation, using a Linux Framebuffer for the output and a USB camera for the input, is shown in the diagram below.

video-latency-test-workflow

Video Output

Interface

Framebuffer Implementation

Video Capture

Interface

Framebuffer Implementation

Frame Types

Frame types provide a method of generating frames written to the Video Output device, along with a method of validating those frames from the Video Capture device.

Interface

Solid Colors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

video-latency-test-0.0.7.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

video_latency_test-0.0.7-py3-none-any.whl (13.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page