如何减少实时平滑流式会议解决方案中的延迟?

时间:2011-03-30 17:55:02

标签: iis streaming smooth expression-encoder low-latency

我正在使用Expression Encoder SDK对我的网络摄像头进行实时录制,将其发布到支持IIS 7.5和Media Services 4的Web服务器,并使用SmoothStreamingClient进行查看。

然而,由于我的目标是实时会议解决方案,我需要大幅减少本地预览和远程播放之间的20秒延迟。

我在某些地方读过可以配置实时平滑流以获得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应该提供的所谓“低延迟支持”?

提前致谢!

1 个答案:

答案 0 :(得分:1)

我认为IIS仅支持移动流的段大小更改。但是,如果您降低这些段大小然后以某种方式模仿移动设备,我确信延迟会下降。

您还可以尝试在“实时流畅的热点发布点”部分的高级选项卡中降低线段预测。

总而言之,IIS似乎不支持此功能。我的建议是寻找另一种会议解决方案,因为在当前状态下,HTTP流不会少于~2秒的延迟。