我使用Expression Encoder SDK对我的摄像头进行实时录制,并将其发布到支持IIS 7.5和Media Services 4的Web服务器,并使用SmoothStreamingClient查看它。如何减少Live Smooth Streaming会议解决方案中的延迟?
但是,由于我打算采用实时会议解决方案,因此我需要大幅减少本地预览和远程播放之间的20秒延迟。
我读过一些地方可以配置Live Smooth Streaming以获得2秒的延迟,但是,我还没有找到任何教程解释如何配置这样的解决方案,无论是编码,提供方和消费方。
这是我使用的编码所拍摄的视频代码:
// 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();
有什么我可以添加到这个代码,会产生较低的延迟?如果不是,我可以在哪里配置Smooth Streaming应该提供的所谓“低延迟支持”?
在此先感谢!