Как указать битрейт кодирования при захвате с веб-камеры - MS Expression Encoder 4 - PullRequest
1 голос
/ 07 октября 2010

У меня есть программа для захвата и сохранения видео с веб-камеры. Это взято из примеров программ, поставляемых с 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();

Как указать битрейт кодированного видео.

1 Ответ

1 голос
/ 05 января 2011

Вам необходимо добавить формат

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