Start » Filter Reference » Image » Image IO » WriteVideo

WriteVideo


Module: FoundationLite

Writes an image sequence to a video file one frame per iteration.

Name Type Range Description
Input value
inImage Image Current frame
Input value
inFile File File path of the output file
Input value
inFourCC VideoEncoderName Four-character code, designating which codec to use
Input value
inFPS Real* 1.0 - 500.0 Requested frame rate of the produced video file

Requirements

For input inImage only pixel formats are supported: 3⨯uint8.

Read more about pixel formats in Image documentation.

Description

The operation saves the sequence of images passed onto its inImage port to an AVI file using the selected video encoder. Available encoders represented by theirs fourCC codes can be obtained using GetAvailableVideoCompressors filter. Please note, that no encoder is shipped with Aurora Vision products, and to use this filter correctly additional, third party software has to be installed. Examples of freely available video encoders:

  • Cinepak - legacy encoder that should be available on nearly every Windows-based machine, as it comes bundled with the Video for Windows for x86 platform.
  • FFDShow - configurable encoder supporting various formats. The newest version can be obtained from the website http://ffdshow-tryout.sourceforge.net/. When used with Windows 10, only x86 version is working.
  • Xvid - popular, modern encoder available at https://www.xvid.com/.

The filter requires that the selected file has an .avi extension. If the selected file does not exist, it will be created on filter execution. If the selected file does exist, it will be overwritten.

The filter produces the resulting video by putting together frames at rate of one frame per iteration. As the FPS of the produced avi file is fixed (at the value of inFPS), the resulting videos may appear as sped up (if the iteration time was longer than 1/inFPS of a second) or slowed down (if the iteration time was shorter than 1/inFPS of a second).

Remarks

This filter uses external components, which can open additional windows or require initial configuration. Please, consult your codecs vendor in case of any troubles.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Empty FourCC code. If no FourCCs codes are available, please install external codecs.
DomainError Empty path inFile in WriteVideo.
DomainError File path cannot be changed during writing in WriteVideo.
DomainError Image width and height must be a multiple of four in WriteVideo.
DomainError Not supported inImage pixel format in AvsFilter_WriteVideo. Supported formats: 3xUInt8.
RuntimeError An runtime error occurred during video writing. This is probably caused by faulty codec. Try to use different codec
RuntimeError An runtime error occurred during video writing. This is probably caused by faulty codec.Error message

Complexity Level

This filter is available on Basic Complexity Level.

Disabled in Lite Edition

This filter is disabled in Lite Edition. It is available only in full, Aurora Vision Studio Professional version.

See Also

  • ReadVideo – Reads a frame sequence from a video file.