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