我用 MICROSOFT ENCODER SDK 的 IWMEncVideoSource2.Channel SAMPLE CODE 来测试失败' Create a WMEncoder object.
Dim Encoder As WMEncoder
Set Encoder = New WMEncoder' Create a source group and add the sources.
Dim SrcGrpColl As IWMEncSourceGroupCollection
Dim SrcGrp As IWMEncSourceGroup
Dim SrcAud As IWMEncAudioSource
Dim SrcVid As IWMEncVideoSource2
Set SrcGrpColl = Encoder.SourceGroupCollection
Set SrcGrp = SrcGrpColl.Add("SG_1")
Set SrcAud = SrcGrp.AddSource(WMENC_AUDIO)
Set SrcVid = SrcGrp.AddSource(WMENC_VIDEO)
SrcAud.SetInput "Device://Default_Audio_Device"
SrcVid.SetInput "Device://Default_Video_Device"' Configure the output and profile for the encoding session.' Initialize the encoding process.
Encoder.PrepareToEncode True <--这个卡  加了源文件后 Set InputColl = SrcVid.EnumerateInputs  <-- 这里卡住了
' Enumerate the type of inputs supported by the TV-tuner capture card.
' Find and select the Video Tuner input.
Dim InputColl As IWMEncInputCollection
Set InputColl = SrcVid.EnumerateInputs  <-- 这里卡住了
For x = 0 To InputColl.Count - 1
If InputColl.Item(x) = "Video Tuner" Then
SrcVid.Input = x
Exit For
End If
Next x' Specify the TV channel, pixel format, and country/region code (USA).
SrcVid.Channel = 5
SrcVid.PixelFormat = WMENC_PIXELFORMAT_UYVY
SrcVid.Country = 1' Specify cable reception.
SrcVid.TVType = 0' Specify the NTSC TV format.
SrcVid.TVFormat = 1' Start encoding.
Encoder.Start
请求帮助!