A MediaStreamContainer describes a video file format. The most common video file format is AVI.
A list of valid MediaStreamContainer objects can be obtained from MediaStreamContainer.MediaStreamContainers.
The following code fragment shows how to create a MediaStreamSink to record an AVI file:
[C#]
// Create the MediaStreamSink. MediaStreamSink aviSink = new MediaStreamSink(); // Set AVI as the video file format. foreach( MediaStreamContainer msc in ICImagingControl1.MediaStreamContainers ) { if( msc.Name == "AVI" ) { aviSink.StreamContainer = msc; break; } } // 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 | ||
CustomCodecSupported |
Returns whether a MediaStreamContainer allows an AviCompressor to be used to compress the recorded video. |
||
ID |
Returns the GUID of a MediaStreamContainer. |
||
MediaStreamContainers |
Returns a list containing all available MediaStreamContainers. |
||
Name |
Returns the name of the MediaStreamContainer. |
||
PreferredFileExtension |
Returns the default file extension for video files saved by this MediaStreamContainer. |
||
Method | Description | ||
MediaStreamContainer |
Creates an new MediaStreamContainer object. |
||
⋯
⋯ ⋯
Established in 1988, 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.