从网络摄像头捕获时如何指定编码比特率-MS Expression Encoder 4 [英] How to specify encoding bitrate while capturing from a webcam - MS Expression Encoder 4

查看:129
本文介绍了从网络摄像头捕获时如何指定编码比特率-MS Expression Encoder 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序可以捕获和保存实时网络摄像头视频. 这是从Expression Encoder 4附带的示例程序中提取的.

I have a program to capture and save live webcam video. This is taken from sample programs coming with 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();

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

How to specify the bitrate of the encoded video.

推荐答案

您需要添加格式

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

这篇关于从网络摄像头捕获时如何指定编码比特率-MS Expression Encoder 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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