SetCodec
Top  Previous  Next

Description

Sets the name of the codec (video compressor) to be used during the AVI capture.


Syntax


[VB]
objActiveGige.SetCodec Name


[C/C++]
HRESULT SetCodec(bstr Name);


Data Types
[VB]

Name: String

Parameters
[C/C++]

Name [in]  
String specifying the name of the feature  


Return Values


S_OK  
Success  
E_FAIL  
Failure to set the codec  
 

Example


The following VB example demonstrates the use of the DivX codec:

Private Sub
Form_Load()
ActiveGige1.SetCodec "DivX 5.0.2 Codec"
ActiveGige1.Acquire=
True

End Sub


Private Sub
StartButton_Click()
ActiveGige1.StartCapture "c:\mycapture.avi"
End Sub


Private Sub
StopButton_Click()
ActiveGige1.StopCapture

End Sub


The following VB example demonstrates how to set up a codec by its index in the system:

CodecList=ActiveGige1.GetCodecList
CodecName=CodecList(9)
ActiveGige1.SetCodec CodecName
 

Remarks


The name of the codec must be precise in order for SetCodec to work. An extra space in the name of the codec may cause this function to fail. To avoid errors, It is recommended to use an index of the codec rather than its name, as shown in the second example above.

ActiveGige video recording engine includes a proprietary "Raw Uncompressed" codec. When the camera streams video in the Bayer format and the "Raw Uncompressed codec is selected, ActiveGige records the video in its original raw format while displaying it in color. This reduces the disk space requirements by three times without any degradation in the image quality. In addition, when high-depth pixel formats are used (such as Bayer10, Bayer12, Bayer16, Mono10, Mono 12, Mono16), the recorded video will be packed into the 12-bit per pixel format as opposed to 16 bit, thus saving extra 25% of the disk space. To decode and play back AVI files recorded with the "Raw Uncompressed" codec, use video playback methods of the DVR version of ActiveGige.