【问题标题】:How to specify encoding bitrate while capturing from a webcam - MS Expression Encoder 4如何在从网络摄像头捕获时指定编码比特率 - MS Expression Encoder 4
【发布时间】:2010-10-07 05:52:23
【问题描述】:

我有一个程序来捕捉和保存实时网络摄像头视频。 这取自 Expression Encoder 4 附带的示例程序。

LiveJob job = new LiveJob();
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;

LiveDeviceSource deviceSource = job.AddDeviceSource(video, audio);
job.ActivateSource(deviceSource);

//When the Start Encoding Button is clicked.
fileOut.OutputFileName = "C:\\output\\Capture\\Video1.wmv";
job.PublishFormats.Add(fileOut);
job.StartEncoding();

//When the Stop Encoding Button is clicked.
job.StartEncoding();

如何指定编码视频的比特率。

【问题讨论】:

    标签: webcam bitrate expression-encoder expression-encoder-sdk


    【解决方案1】:

    你需要添加格式

    WindowsMediaOutputFormat outputFormat = new WindowsMediaOutputFormat();  
    AdvancedVC1VideoProfile profile = new AdvancedVC1VideoProfile();  
    profile.Bitrate = 1;  
    outputFormat.VideoProfile = profile;  
    job.OutputFormat = outputFormat;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-02-09
      • 2011-01-03
      • 1970-01-01
      • 1970-01-01
      • 2013-01-18
      相关资源
      最近更新 更多