IC Imaging Control .NET



The MediaStreamSink allows video files to be recorded in a more sophisticated manor than is possible using AviStartCapture and AviStopCapture. However, for simple tasks, the methods AviStartCapture and AviStopCapture are better suited, as they are really easy to use. A MediaStreamSink can save image data to video files in various formats and optionally allows you to specify one or more FrameFilters that can analyze and/or transform the image data, before it is written to the video file.

The FrameFilter implementation can also drop certain frames, thus enabling lapse recording applications to be easily authored. The video file format is specified by a MediaStreamContainer, while the format of the image data in the file is determined by a codec, represented as an AviCompressor object. The MediaStreamContainer determines the video file format; the most common MediaStreamContainer is AVI. Many media stream containers allow the specification of an AviCompressor to compress the image data before writing it to the file.


The following code fragment shows how to create a MediaStreamSink to record an AVI file.

// Create the MediaStreamSink. MediaStreamSink aviSink = new MediaStreamSink(); // We do not set aviSink.StreamContainer to record an AVI file, // as AVI is the default file format. // Set DV Video encoder as the codec. foreach( AviCompressor codec in AviCompressor.AviCompressors ) { if( codec.Name == "DV Video Encoder" ) { aviSink.Codec = codec; break; } } // Set a target file name. aviSink.Filename = "video.avi"; // Set the sink. ICImagingControl1.Sink = aviSink; // Start recording. ICImagingControl1.LiveStart();


Namespace: TIS.Imaging
Introduced in version 3.0




Property Description

Returns or sets the used AviCompressor.


Returns or sets the name of the target video file.


The FrameFilters property grants access to a FrameFilters collection that can be used to manipulate the filter chain used to transform the image data, before it is written to the video file.


Returns or sets the used MediaStreamContainer.


Method Description

Creates a new MediaStreamSink.

<< Classes

Get in touch with us

About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, video converters and embedded vision components for factory automation, quality assurance, medicine, science, security and a variety of other markets.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE, MIPI interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

ISO 9001:2015 certified MVTEC | Edge AI + Vision Alliance | EMVA

Contact us