2011-03-30 22 views
7

我使用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應該提供的所謂「低延遲支持」?

在此先感謝!

回答

1

我相信IIS只支持移動流的段大小更改。不過,如果您降低這些細分市場的大小,然後以某種方式模仿移動設備,我相信延遲會降低。

您還可以嘗試降低「實時流暢蒸汽發佈點」部分的高級選項卡中的細分預測。

總而言之,它看起來並不像IIS支持這個功能。我的建議是尋求另一種會議解決方案,因爲在當前狀態下,HTTP流傳輸的延遲時間不會少於2秒。