tvpipe tvpipeOperations Manual
Section 18Latency
18
Command
test-pattern
Option
--latency MS

Latency

For development: how far the TV runs behind the source, and how to measure it.

Built in

The pattern needs no ffmpeg.

18.1The test pattern

$ tvpipe test-pattern --to TV
The test pattern: colour bars, a UTC clock, frame number and media time
Fig. 18.1Colour bars, the UTC time at which the frame was made, the frame number and the media time. A square flashes and a beep sounds once a second.
Measured

About 250 to 270 ms on an Apple TV 4K over Wi-Fi.

18.2Measuring

  1. Stream the test pattern to the TV.
  2. Put a clock with milliseconds next to it, for example on the computer’s screen.
  3. Photograph both. The difference between the clocks is the delay.

Phones stamp photos late. Photograph a millisecond clock on its own first and subtract that offset.

18.3Playout delay

--latency sets how long receivers wait before they show a frame, from 5 to 2000 ms. It is the same on every receiver of a session.

ReceiversDefault
AirPlayvideo 100 ms, audio 170 ms
Cast300 ms
AirPlay and Cast300 ms
Browser only100 ms

Lower values drop frames on busy Wi-Fi.

18.4Player statistics

Press S on the player page for its statistics.

The player with its statistics
Fig. 18.2The stream, the delay against its target, dropped frames, the decoder queue, audio sync and the time of the frame on screen.