EDN Admin
Well-known member
<span style="border-collapse:collapse; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; font-size:14px; line-height:18px
<p style=" 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.
<p style=" However, since Im aiming for a real-time conferencing solution, I need to drastically reduce my 20 second latency between the local preview and the remote playback.
<p style=" Ive 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.
<p style=" This is the code Im using to encode the captured video:
<p style="
<div style="color:Black;background-color:White; <pre>
<span style="color:Green; // Aquires audio and video devices
EncoderDevice video = EncoderDevices.FindDevices(EncoderDeviceType.Video).Count > 0 ? EncoderDevices.FindDevices(EncoderDeviceType.Video)[0] : <span style="color:Blue; null;
EncoderDevice audio = EncoderDevices.FindDevices(EncoderDeviceType.Audio).Count > 0 ? EncoderDevices.FindDevices(EncoderDeviceType.Audio)[0] : <span style="color:Blue; null;
<span style="color:Green; // Create a new device source. We use the first audio and video devices on the system
job = <span style="color:Blue; new LiveJob();
LiveDeviceSource deviceSource = job.AddDeviceSource(video, audio);
<span style="color:Green; // sets preview window to winform panel hosted by xaml window
deviceSource.PreviewWindow = <span style="color:Blue; new PreviewWindow(<span style="color:Blue; new HandleRef(prevWindow, prevWindow.GetHandle));
<span style="color:Green; // Make this source the active one
job.ActivateSource(deviceSource);
job.ApplyPreset(LivePresets.VC1IISSmoothStreamingLowBandwidthStandard);
PushBroadcastPublishFormat format = <span style="color:Blue; new PushBroadcastPublishFormat();
format.PublishingPoint = <span style="color:Blue; new Uri(path);
<span style="color:Green; // Adds the publishing format to the job
job.PublishFormats.Add(format);
job.StartEncoding();
[/code]
<p style=" 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?
<p style=" Thanks in advance!
View the full article
<p style=" 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.
<p style=" However, since Im aiming for a real-time conferencing solution, I need to drastically reduce my 20 second latency between the local preview and the remote playback.
<p style=" Ive 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.
<p style=" This is the code Im using to encode the captured video:
<p style="
<div style="color:Black;background-color:White; <pre>
<span style="color:Green; // Aquires audio and video devices
EncoderDevice video = EncoderDevices.FindDevices(EncoderDeviceType.Video).Count > 0 ? EncoderDevices.FindDevices(EncoderDeviceType.Video)[0] : <span style="color:Blue; null;
EncoderDevice audio = EncoderDevices.FindDevices(EncoderDeviceType.Audio).Count > 0 ? EncoderDevices.FindDevices(EncoderDeviceType.Audio)[0] : <span style="color:Blue; null;
<span style="color:Green; // Create a new device source. We use the first audio and video devices on the system
job = <span style="color:Blue; new LiveJob();
LiveDeviceSource deviceSource = job.AddDeviceSource(video, audio);
<span style="color:Green; // sets preview window to winform panel hosted by xaml window
deviceSource.PreviewWindow = <span style="color:Blue; new PreviewWindow(<span style="color:Blue; new HandleRef(prevWindow, prevWindow.GetHandle));
<span style="color:Green; // Make this source the active one
job.ActivateSource(deviceSource);
job.ApplyPreset(LivePresets.VC1IISSmoothStreamingLowBandwidthStandard);
PushBroadcastPublishFormat format = <span style="color:Blue; new PushBroadcastPublishFormat();
format.PublishingPoint = <span style="color:Blue; new Uri(path);
<span style="color:Green; // Adds the publishing format to the job
job.PublishFormats.Add(format);
job.StartEncoding();
[/code]
<p style=" 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?
<p style=" Thanks in advance!
View the full article