如何在EE3 SDK C#中枚举实时捕获设备? [英] How to enumerate live capture devices in EE3 SDK C#?

查看:71
本文介绍了如何在EE3 SDK C#中枚举实时捕获设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢EE3直播功能!我在8核Xeon服务器上使用自定义预设运行了几个小时的测试,并且编码质量优于WME在相同带宽下的编码质量。 EE3更好地利用了可用的CPU,并允许我调整VC-1 Advanced编码参数,以便在与WME相比的同一硬件上获得更好的实时流式传输结果。 感谢EE3团队在实时流媒体部分的精彩工作!
现在我需要自动化实时编码,但遗憾的是SDK中的实时编码示例并未显示如何捕获来自"LiveDevice"源的音频和视频。它仅显示如何从"FileSource"直播流。我需要从Ospray 700HD HD-SDI源捕获并且还想从USB网络摄像头和FireWire DVCAM捕获。

如何枚举实时捕获设备?
如何选择?代码中的LiveDevice源?

LiveDevice videoDevice = ??? ; //这里有什么?
LiveDevice audioDevice = ??? ??? ; //和这里?
LiveDeviceSource liveSource = job.AddDeviceSource(videoDevice,audioDevice);

PS :从设备捕获的完整实时流式PS脚本或C#示例应该是SDK的一部分。有人知道EE3团队博客上承诺的codeplex项目是否已经开始了吗?

感谢您的帮助!

Philipp

解决方案

嗨Philipp,枚举视频和音频设备的最简单方法是通过LiveJob上的集合。有一个LiveJob.VideoDevices和一个LiveJob.AudioDevices集合。如果您希望在运行程序时添加或删除设备,还可以监听DeviceAdded / DeviceRemoved事件。因此,将第一个视频和音频设备添加到作业的简单方法是:

LiveDevice videoDevice = job.VideoDevices [0];
LiveDevice audioDevice = job.AudioDevices [0];

LiveDeviceSource
liveSource = job.AddDeviceSource(videoDevice,audioDevice);

我希望我们有时间像你建议的那样在SDK中添加更完整的实时编码示例,但不幸的是我们没时间了。绝对要注意编码复合,因为我们喜欢在那里记录一些样本。谢谢!萨姆

I love the EE3 live streaming capability! I ran several hours of tests with customized presets on 8 core Xeon server and the encoding quality beats that of WME at the same bandwidth.  EE3 makes better use of the available CPU's and allows me to tweak the VC-1 Advanced encoding parameters to get better live streaming results on the same hardware compared to WME. Thanks to the EE3 team for the fantastic work on the live streaming part!
Now I need to automate the live encoding, but unfortunately the live encoding example in the SDK does not show how to capture audio and video from a "LiveDevice" source. It only shows how to live stream from a "FileSource". I need to capture from a Ospray 700HD HD-SDI source and would also like to capture from USB webcam and FireWire DVCAM.

How do I enumerate the live capture devices?
How do I select the LiveDevice source in code?

LiveDevice videoDevice = ???; // what goes here?
LiveDevice audioDevice = ???; // and here?
LiveDeviceSource liveSource = job.AddDeviceSource(videoDevice, audioDevice);

PS: A complete live streaming PS script or C# example that captures from devices should be part of the SDK. Does anybody know if the codeplex project that was promised on the EE3 team blog is already on the way?

Thanks for your help!

Philipp

解决方案

Hi Philipp, The easiest way to enumerate video and audio devices is through the collections on the LiveJob. There is a LiveJob.VideoDevices and a LiveJob.AudioDevices collection. There is also a DeviceAdded/DeviceRemoved event that can be listened to in case you expect devices to be added or removed while your program is being run. So a simple way to add the first video and audio devices to a job is:

LiveDevice videoDevice = job.VideoDevices[0];
LiveDevice audioDevice = job.AudioDevices[0];

LiveDeviceSource
liveSource = job.AddDeviceSource(videoDevice, audioDevice);

I wish we had time to add more complete live encoding examples to the SDK like you suggested, but unfortunately we ran out of time. Definitely keep an eye on codeplex though because we'd love to document some samples up there. Thanks! Sam


这篇关于如何在EE3 SDK C#中枚举实时捕获设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆