Back to Aurora Vision Library website

You are here: Start » Function Reference » Image » Image IO » EncodeVideo

EncodeVideo


Header: ThirdPartySdk.h
Namespace: avl
Module: ThirdParty

Encodes video from images and saves it with using FFmpeg library.

Syntax

void avl::EncodeVideo
(
	FFmpeg_EncoderState& ioState,
	const atl::File& inFile,
	const avl::FFmpegCodec::Type& inFourCC,
	const avl::Image& inImage,
	int inFPS
)

Parameters

Name Type Default Description
Input will be modified ioState FFmpeg_EncoderState& Object used to maintain state of the function.
Input value inFile const File& File path with the appropriate format, e.g., output.avi
Input value inFourCC const FFmpegCodec::Type& Codec type for video encoding
Input value inImage const Image& Input image to be encoded
Input value inFPS int 20 Frames per second for video encoding

Remarks

To use this filter it is required to install FFmpeg software.

FFmpeg can be downloaded from the following website: https://ffmpeg.org/download.html. Please download the "shared" version of the FFmpeg, but it might be compiled with non-free GPL flags. You can check built options writing in the console ffmpeg -version.

If downloaded version contains non-free elements you will have to upgrade FFmpeg license (contact FFmpeg) or build it from sources with appropriate flags:

./configure --disable-gpl --enable-version3 --disable-nonfree \
            --enable-shared --disable-static \
            --disable-encoder=libx264 --disable-encoder=libx265 --disable-encoder=libxvid \
            --enable-libopenjpeg \
            --enable-libvpx --enable-encoder=libvpx_vp8 --enable-encoder=libvpx_vp9

Recommended FFmpeg version for Aurora Vision Studio usage is 7.1.

Add DLL path to system environment variable may be required.

Video encoder software

This filter is intended to encode upcoming frames into video using FFmpeg library.

This filter can save videos using following codecs and containers:

  • MPEG4 - MP4, AVI, MOV, MKV, 3GP, TS;
  • FFV1 - AVI, MOV, NUT;
  • OpenJPEG - MKV, MOV, MP4, AVI;
  • VP8 - MKV, WEBM, AVI;
  • VP9 - MKV, WEBM.

To use this filter, specify the container type in the inFilename input, e.g., "SampleVideo.avi".