Latency testing with SVSi Hardware

Introduction:

All devices in an AV system from source to destination will add latency between video being generated at a source and eventual display on a monitor, projector, or other display device.  Latency is a cumulative effect; all latency will add up to calculate total system latency.  For many applications, some latency is acceptable.  For example: The latency between a cable television source in a centralized rack to a display in a conference room, while negligible with a SVSi system, is also unnoticed.  However, applications where the source is in the same vicinity as the display, latency may become a factor during system operations.  One of the advantages to JPEG2000 (the SVSi video Codec) is the low latency between source and destination.  In an properly operating system, latency between source and destination going through a SVSi encoder or decoder pair should be approximately 50ms at 720p60.

Latency can oftentimes be challenging to calculate. To reassure both integrators and end users that SVSi systems will function in low latency environments, SVSi periodically tests latency to verify that our system continues to function as preferred and specified.  These tests were performed in early 2013 utilizing encoders and decoders running the current firmware available.

Testing latency through a SVSi system is a multi-step process; best results require a high-speed camera to be able to more precisely test the overall system latency. Since the majority of people do not generally have high-speed cameras readily available, other camera options can be utilized.  Testing without a high-speed camera may produce results that are not as precise, as frames may be blended together or blurred.  Testing methods for more commonly available tools (such as an iPhone) are discussed below. The results of those tests are also documented to provide a means to test latency in real-world applications and also to compare the results with those generated using a high-speed camera.

Hardware for Testing Latency:

1 x LCD Monitor
1 x Laptop/Computer Source with HDMI output available
1 x Custom Created SVSi Latency Test Video file (720p60)
1 x SVSi Encoder
1 x SVSi Decoder
2 x Video cables to connect source to device’s or to SVSi hardware
1 x Cat5e Patch Cable
1 x High-Speed Camera

Converting Frames per Second into Milliseconds:

 A note – this method of testing calculates results in Frames per Second.  To calculate the latency in milliseconds, additional calculations must be performed and vary based on the frame rate.  To Convert FPS to milliseconds:

1 (second) / FPS

For a video running at 60fps, each frame is displayed for .0166666 seconds, or 16.66ms. For a video running at 200fps, each frame is displayed for 5ms. The High-Speed Camera utilized by SVSi for these tests shoots videos at 200 fps.

How to Measure Total System Latency and Individual Device Latency:

Step 1: Determine display native latency.

Source_TO_Display_latencyTest.png

Connect the source device directly to the display, as in the diagram above.  SVSi utilized a standard computer monitor with a HDMI to DVI cable originating from a Laptop with HDMI output. The laptop was configured to mirror the display and output 720p60.

After capturing several seconds of video in this configuration, the video was reviewed.  For this process, we started by selecting a frame and recording the frame number displayed on the laptop monitor.  Then we stepped forward in the file by one frame, and then we counted the number of frames until the same number appears on the computer monitor.  For this particular monitor, the native latency is 5ms or 1 frame.

Step 2:  Determine the total system latency utilizing a SVSi encoder and decoder combination.

 Source_SVSI_Display_latencyTest.png

Repeat the same test as above, but this time with the laptop connected to a SVSi encoder which is paired with a SVSi decoder that is viewing the video stream.  This test revealed that the delay when utilizing SVSi hardware was 11 frames.   With the video shooting at 200FPS, this latency calculates out to 55ms.

 

Frame1.png                                          Frame2.png

First Frame where "46" is visible                                                                  11 Frames later, "46" is visible on extended display

Step 3: Determine SVSI specific latency.

To determine SVSi specific latency, simply subtract the displays native latency from the total system latency.  For this test:

55ms – 5ms = 50ms
11 Frames – 1 Frame = 10 Frames (at 200fps).

In addition to the direct connected test above, we also recreated the test utilizing a SVSi preconfigured VSW500-24p so we could test the latency added by the network switch.  The results were fundamentally identical and showed that the switch added less than 1ms of latency. These test's were also performed with the high speed camera capturing at 600fps, the results were identical.

Methods to recreate the test with commonly available hardware:

Since most people don’t have readily available access to high-speed cameras (the benefit of having started in the high speed camera market!), an integrator can still recreate similar tests to those undertaken by SVSi on a job site if desired.  This process does have some limitations that need to be addressed when determining latency, as the camera technology most people have available cannot recreate the high frame rate that a high-speed camera can.

Step 1: Determine display native latency.

In proceeding with this test, an iPhone 4s was utilized with the App “Fast Camera”.  This app takes pictures at a decent rate, better than what the standard camera app can do.  With the source connected directly to the display and configured as a mirrored display at 720p60, start Fast Camera and let the app run; for this test, SVSi let the app take around 150 pictures. Since this approach does not utilize video, you must take each picture and analyze each for the frame numbers displayed on each screen.  One of the limitations of this method is that most (if not all) frames will have a blurring between one number and another.

Frame3.png

Photo taken with iPhone 4s with Fast Camera App - Note the blurring of frame numbers in the picture.

 

The next step is to record the data, specifically recording the frame number displayed on both the source display and the extended display.  Having a larger sample size of images will result in slightly better accuracy when the latency is averaged; for this purpose, we used a sample size of twenty images for each calculation.  For this test, SVSi utilized a Toshiba 32” LCD Display, which has a higher native latency then a computer monitor.

Laptop

Monitor

Latency in Frames

Latency in MS

23

20

3

49.98

32

28

4

66.64

33

30

3

49.98

42

38

4

66.64

43

41

2

33.32

52

48

4

66.64

57

55

2

33.32

60

58

2

33.32

10

8

2

33.32

14

12

2

33.32

20

18

2

33.32

25

23

2

33.32

30

27

3

49.98

35

33

2

33.32

35

33

2

33.32

45

43

2

33.32

52

49

3

49.98

56

54

2

33.32

60

59

1

16.66

5

3

2

33.32

Average Latency in Frames = 2.45
Average Latency in MS = 40.817

 

Once the data is recorded, simply subtract the laptop’s frame number from the monitor’s frame number to get the latency in frames and then multiply the frames by 16.66 to arrive at the latency in MS.  Once completed, average the results by summing them all and dividing by 20.

Step 2:  Determine the total system latency utilizing a SVSi encoder and decoder combination.

Recreate the test again with the source connected to a SVSi encoder and the display connected to a SVSi Decoder.  The test results are below:

Laptop

Monitor

Latency in Frames

Latency in MS

9

1

8

133.28

11

6

5

83.3

21

14

7

116.62

28

20

8

133.28

32

24

8

133.28

33

29

4

66.64

42

34

8

133.28

43

40

3

49.98

53

46

7

116.62

55

48

7

116.62

60

54

6

99.96

12

1

11

183.26

13

9

4

66.64

22

13

9

149.94

23

19

4

66.64

30

23

7

116.62

33

28

5

83.3

43

35

8

133.28

42

38

4

66.64

50

43

7

116.62

Average Latency in Frames = 6.5
Average Latency in MS = 108.29

 

Step 3: Determine SVSI specific latency.

Subtract the monitor’s native latency from the total system latency:

Total System Latency – Display Native Latency = SVSi Latency

108.29 – 40.817 = 67.46 MS

 

Conclusion:

When conducting a test with a high-speed camera for better precision, the latency of the SVSi system is 50ms at 60 Frames per second, which equates to three frames of video.  Other discussed methods, because of their limitations, will most likely indicate a slightly higher latency then when tested using high-speed cameras.  

Other resolutions, with lower frame rates (like 1080p30) will appear to have higher latency due to the lower frame rate.  Any additional components between source and destination may also increase overall system latency, and all devices in the chain from source to destination must have their latency individually calculated to get a full understanding of where latency is being introduced in a particular application.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk