Difference between revisions of "RTP Buffering - Frame Based Buffering"
(→PCM) |
|||
Line 142: | Line 142: | ||
|'''Max delay (SC)''' | |'''Max delay (SC)''' | ||
|'''Max delay (ABCL)''' | |'''Max delay (ABCL)''' | ||
|'''Max delay (ABCL full duplex)''' | |||
|- | |- | ||
| uLaw 8kHz mono<br> | | uLaw 8kHz mono<br> | ||
ALaw 8kHz mono | ALaw 8kHz mono | ||
| 349ms | |||
| 80ms | |||
| 8170ms | |||
| 4057ms | |||
| 2027ms | |||
|- | |- | ||
| PCM 8kHz mono | | PCM 8kHz mono | ||
| 323ms | |||
| 60ms | |||
| 4075ms | |||
| 2027ms | |||
| 1003ms | |||
|- | |- | ||
| uLaw 12kHz mono<br> | | uLaw 12kHz mono<br> | ||
ALaw 12kHz mono | ALaw 12kHz mono | ||
| 246ms | |||
| 67ms | |||
| 5441ms | |||
| 2710ms | |||
| 1345ms | |||
|- | |- | ||
| PCM 12kHz mono | | PCM 12kHz mono | ||
| 229ms | |||
| 54ms | |||
| 2710ms | |||
| 1345ms | |||
| 662ms | |||
|- | |- | ||
| uLaw 24kHz mono<br> | | uLaw 24kHz mono<br> |
Revision as of 09:09, 24 June 2010
Introduction
In Song module version 8 a new RTP buffering method called frame based buffering was introduced. The algorithm calculates the audio buffer level in milliseconds rather than in bytes.
Features
Frame based buffering allows:
- configurable decoding delay with one frame accuracy
- synchronisation of several decoders to the same stream (just by configuring them to the same initial delay)
- stable delay over long period of time
- automatic correction of clock difference between encoder and decoder
Applications
The following applications use frame based buffering:
Application Name | Version |
Streaming Client | 2.17 |
Annuncicom Full Duplex | 0.21 |
RTP STL | 2.01 |
Configuration
The only configuration parameter for the RTP decoder is the delay in milliseconds.
The delay parameter is the desired processing delay of the decoder (between the network input and the audio output). Please note that the end-to-end delay between the encoder and the decoder might be (significantly) different to the value configured.
In an ideal case the delay parameter would be 0 ms, however due to device's internal buffers a small delay (depending on the hardware) is inevitable. The delay value should also cover possible temporary network hick-ups (jitter). E.g. if the network might sometimes delay the packet delivery by 20ms due to a temporary load, the configured parameter should not be less than 20ms.
The maximum configurable delay is limited by the device's internal buffer (64, 32 or 16kB).
The following sections show recommended delay values for various audio formats.
Recommended Settings
MP3 CBR
The following table shows the minimum and the maximum possible delay with MP3 constant bitrate. The maximum delay differs between the Streaming Client, which has 64kB audio buffer available, and ABCL (Annuncicom FDX, STL), which features only 32kB buffer. The minimum delay includes 100ms network jitter.
MP3 CBR bitrate | Min delay | Max delay (SC) | Max delay (ABCL) |
320kbps | 150ms | 1,588ms | 769ms |
256kbps | 163ms | 2,011ms | 987ms |
192kbps | 183ms | 2,741ms | 1,349ms |
160kbps | 200ms | 3,277ms | 1,638ms |
128kbps | 225ms | 4,121ms | 2,073ms |
64kbps | 350ms | 8,342ms | 4,246ms |
32kbps | 600ms | 16,784ms | 8,592ms |
MP3 VBR and ABR
Variable or average bitrate the minimum and delay depends on the bitrate variation interval. The minimum delay is taken from the CBR table for the low end of the interval, whereas the maximum delay is the CBR value for the high end of the interval.
Please note that most MP3 encoders use the whole bitrate range starting from the lowest bitrate 32kbps. E.g. VBR 128kbps varies from 32 to 128kbps
MP3 Format | Min delay | Max delay (SC) | Max delay (ABCL) |
32-320kbps | 600ms | 1,588ms | 769ms |
32-256kbps | 600ms | 2,011ms | 987ms |
32-192kbps | 600ms | 2,741ms | 1,349ms |
32-160kbps | 600ms | 3,277ms | 1,638ms |
32-128kbps | 600ms | 4,121ms | 2,073ms |
32-64kbps | 600ms | 8,342ms | 4,246ms |
PCM
In uncompressed audio (PCM, uLaw or ALaw) the minimum and maximum delay depend on the bit rate and on the hardware.
The following table lists minimum and maximum settings for all standard RTP audio formats:
Format | Min delay VLSI | Min delay MAS | Max delay (SC) | Max delay (ABCL) | Max delay (ABCL full duplex) |
uLaw 8kHz mono ALaw 8kHz mono |
349ms | 80ms | 8170ms | 4057ms | 2027ms |
PCM 8kHz mono | 323ms | 60ms | 4075ms | 2027ms | 1003ms |
uLaw 12kHz mono ALaw 12kHz mono |
246ms | 67ms | 5441ms | 2710ms | 1345ms |
PCM 12kHz mono | 229ms | 54ms | 2710ms | 1345ms | 662ms |
uLaw 24kHz mono ALaw 24kHz mono | |||||
PCM 24kHz mono | |||||
uLaw 32kHz mono ALaw 32kHz mono | |||||
PCM 32kHz mono | |||||
PCM 44.1kHz stereo | |||||
PCM 44.1kHz mono | |||||
PCM 48kHz stereo |
Multiple Device Synchronisation
Multiple devices receiving the same RTP stream can be configured to play in sync by entering the same delay parameter.
Barix recommends to use broadcast or multicast together with synchronisation, otherwise a small inaccuracy (few milliseconds) might be caused by the network delivery to different locations.
Deliberate Delays
In some applications it is desired to artificially delay the audio. E.g. in a tunnel to eliminate the delay caused by the distance between the devices.
An artificial delay can be introduced by configuring the devices to different delay values. E.g. 100ms, 120ms, 140ms, 160ms, etc.