Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I reduce latency in a Live Smooth Streaming conferencing solution?

I am using Expression Encoder SDK to encode a live recording of my webcam, publish it to a web server supporting IIS 7.5 and Media Services 4 and viewing it with the SmoothStreamingClient.

However, since I'm aiming for a real-time conferencing solution, I need to drastically reduce my 20 second latency between the local preview and the remote playback.

I've read in some places that it is possible to configure Live Smooth Streaming in order to obtain a 2 second latency, however, I have not found any tutorial explaining how to configure such a solution, both on the encoding, the providing and the consuming sides.

This is the code I'm using to encode the captured video:

// Aquires audio and video devices
EncoderDevice video = EncoderDevices.FindDevices(EncoderDeviceType.Video).Count > 0 ? EncoderDevices.FindDevices(EncoderDeviceType.Video)[0] : null;
EncoderDevice audio = EncoderDevices.FindDevices(EncoderDeviceType.Audio).Count > 0 ? EncoderDevices.FindDevices(EncoderDeviceType.Audio)[0] : null;

// Create a new device source. We use the first audio and video devices on the system
job = new LiveJob();
LiveDeviceSource deviceSource = job.AddDeviceSource(video, audio);

// sets preview window to winform panel hosted by xaml window
deviceSource.PreviewWindow = new PreviewWindow(new HandleRef(prevWindow, prevWindow.GetHandle));

// Make this source the active one
job.ActivateSource(deviceSource);

job.ApplyPreset(LivePresets.VC1IISSmoothStreamingLowBandwidthStandard);

PushBroadcastPublishFormat format = new PushBroadcastPublishFormat();
format.PublishingPoint = new Uri(path);

// Adds the publishing format to the job
job.PublishFormats.Add(format);

job.StartEncoding();

Is there something I can add to this code that will produce lower latency? If not, where can I configure the so called "low-latency support" that Smooth Streaming is supposed to provide?

Thanks in advance!

like image 782
LostKaleb Avatar asked Mar 30 '11 17:03

LostKaleb


1 Answers

I believe that IIS only supports segment size changes for the mobile streams. However, if you lower these segment sizes and then somehow mimic a mobile device, I am sure the latency would go down.

You could also try lowering the segment lookahead in the advanced tab of the 'live smooth steaming publishing points' section.

All in all, it doesn't look like this feature is supported with IIS. My advice would be to look towards another solution for conferencing as you wil never get less than ~2 seconds of latency with HTTP streaming in its current state.

like image 118
smp Avatar answered Oct 22 '22 03:10

smp