Difference between revisions of "Reducing audio video streaming latency"

From RidgeRun Developer Connection
Jump to: navigation, search
(ALSA or JACK for audio)
Line 10: Line 10:
  
 
The standard Linux library for using APIS (for example alsa-lib) can add latency into audio streamings, one solution is to use JACK instead [http://jackaudio.org/ jackaudio.org/]. Jack is an audio server that can redirect audio from one piece of software to another, using JACK doesn't introduces extra latency into the system, on the other hand using JACK adds a slight increase in the amount of used CPU. On testing JACK by itself adds almost no latency to the system, but if you need extreme low latency JACK can be used with Real Time kernels.
 
The standard Linux library for using APIS (for example alsa-lib) can add latency into audio streamings, one solution is to use JACK instead [http://jackaudio.org/ jackaudio.org/]. Jack is an audio server that can redirect audio from one piece of software to another, using JACK doesn't introduces extra latency into the system, on the other hand using JACK adds a slight increase in the amount of used CPU. On testing JACK by itself adds almost no latency to the system, but if you need extreme low latency JACK can be used with Real Time kernels.
 +
 +
Jack server (Jackd) can be used for redirecting audio from one device to another, there are also Gstreamer applications for audio sinks and sources that are JACK compatible:
 +
*jackaudiosink
 +
*jackaudiosrc
 +
  
  
 
<br>
 
<br>

Revision as of 16:11, 12 August 2014

Background

A doctor is performing microscopic surgery. An in-body camera is capturing the video and an LCD is displaying the surgery site. The doctor is operating by looking at the LCD display. Even a latency of 50 ms will effect the doctor's ability to operate. For this RidgeRun customer, the solution was to feed the video though an FPGA and straight to the LCD to minimize latency.

A police officer has an A/V capture device with an LCD on the back. The police officer occasionally turns on the LCD to verify the camera is working as expected.

What causes latency

ALSA or JACK for audio

The standard Linux library for using APIS (for example alsa-lib) can add latency into audio streamings, one solution is to use JACK instead jackaudio.org/. Jack is an audio server that can redirect audio from one piece of software to another, using JACK doesn't introduces extra latency into the system, on the other hand using JACK adds a slight increase in the amount of used CPU. On testing JACK by itself adds almost no latency to the system, but if you need extreme low latency JACK can be used with Real Time kernels.

Jack server (Jackd) can be used for redirecting audio from one device to another, there are also Gstreamer applications for audio sinks and sources that are JACK compatible:

  • jackaudiosink
  • jackaudiosrc