Video capture to MPEG-2 file using TV Tuner with Internal MPEG encoder
MPEG-2, released in 1995, is a standard for "the generic coding of moving pictures and associated audio information." It's widely used in digital television, DVD video, and in broadcasting. MPEG-2 offers high-quality video and audio, making it a standard for digital TV and DVDs.
Sample code
First, configure the video capture device.
1. Get a list of available MPEG-2 Hardware Encoders
foreach (var specialFilter in VideoCapture1.Special_Filters(SpecialFilterType.HardwareVideoEncoder))
{
cbMPEGEncoder.Items.Add(specialFilter);
}
2. Select the encoder
VideoCapture1.Video_CaptureDevice.InternalMPEGEncoder_Name = cbMPEGEncoder.Text;
3. Use DirectCapture MPEG for output
VideoCapture1.Output_Format = new DirectCaptureMPEGOutput();
4. Set video capture mode, file name, and start
VideoCapture1.Mode = VideoCaptureMode.VideoCapture;
VideoCapture1.Output_Filename = "output.mpg";
await VideoCapture1.StartAsync();
Required redists
Visit our GitHub page to get more code samples.