Log in

View Full Version : minimum latency local broadcast


Miscellaneo
7th August 2013, 00:41
Hi All,
I'm trying to solve a problem for a customer who is attempting to multicast an x264, AAC stream to several endpoints around a facility, and has a requirement that it be in exhaust-scraping low latency. Because of some live-inject needs they want the end-to-end delay to be below 340ms, ideally below 260ms.
The source is an Osprey 825e capture card (directshow), bringing in HD-SDI. Although they do not need the stream to be HD, they do need the audio to be decent quality, especially in the vocal range.
Basically I'm struggling to find a setup that will achieve this result. We have found that streaminig without audio reduces delay substantially (to within their target delay) but that defeats most of the purpose. They are not tied to any particular codecs, programs or players (although encoding occurs on a win server 2008rt system which constrains it a little) so any and all suggestions are welcome!

Any ideas? I haven't managed to configure good ol' VLC to produce latency of less than half a second.

-Miscellaneo

kieranrk
7th August 2013, 02:08
OBE (see signature) can gives that sort of latency when encoding HD-SDI to a professional broadcast receiver. However, we're Linux only and only Blackmagic cards have been tested in production.

OBE uses x264's single-frame-VBV to achieve this.

Miscellaneo
7th August 2013, 02:18
Awesome, I'll check it out now. Do you have any recommended settings I should use?

kieranrk
7th August 2013, 03:21
Basically follow the wiki instructions for lowestlatency and it should work.

Miscellaneo
8th August 2013, 06:55
OBE looks good, but unfortunately we're stuck using a win server 2008 rt OS, as they have to run other applications simultaneously.

kieranrk
8th August 2013, 14:17
OBE looks good, but unfortunately we're stuck using a win server 2008 rt OS, as they have to run other applications simultaneously.

Running other applications alongside a realtime encoder is a bad idea in general unless you have tons of cpu spare.

raffriff42
12th August 2013, 02:21
Just stumbled on this excellent look at low latency - Diary Of An x264 Developer, by Dark Shikari
x264: the best low-latency video streaming platform in the world (http://x264dev.multimedia.cx/archives/249)

...No longer does 200ms seem out of reach. If anything, it’s now far more than we need. Because with –tune zerolatency, single-frame VBV, and intra refresh, x264 can achieve end-to-end latency (not including transport) of under 10 milliseconds for an 800×600 video stream. And it’s all open source.
...
For you and anyone who wants to test this, you can try it yourself with the appropriate x264 options:

–slice-max-size A –vbv-maxrate B –vbv-bufsize C –crf D –intra-refresh –tune zerolatency

Where
A is your packet size
B is your connection speed
C is (B / FPS)
D is a number from 18-30 or so (quality level, lower is better but higher bitrate).

Equally, you can do constant bitrate instead of capped constant quality, by replacing CRF with –bitrate B, where B is the maxrate above.

And see also: MeWiki X264 Encoding Suggestions: Encoder latency (http://mewiki.project357.com/wiki/X264_Encoding_Suggestions#Encoder_latency)