I use the Expression Encoder SDK to encode a live recording of my webcam, publish it to a web server that supports IIS 7.5 and Media Services 4, and view it using SmoothStreamingClient.
However, since I am aiming for a real-time conferencing solution, I need to drastically reduce the 20 second delay between local preview and remote playback.
I read in some places that you can configure Live Smooth Streaming to get a 2-second delay, but I did not find a tutorial explaining how to set up such a solution both on the encoding and on the providing and consuming sides.
This is the code I use 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 anything I can add to this code that will result in lower latency? If not, where can I configure the so-called "low latency support" that Smooth Streaming is supposed to provide?
Thanks in advance!
Lostkaleb
source share