Back to Aurora Vision Library website

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

DecodeVideo


Header: ThirdPartySdk.h
Namespace: avl
Module: ThirdParty

Captures an image from video file with using FFmpeg library.

Syntax

bool avl::DecodeVideo
(
	FFmpeg_DecoderState& ioState,
	const atl::File& inFile,
	const atl::Optional<atl::int64> inStartFrameId,
	avl::Image& outImage,
	atl::int64& outFrameId
)

Parameters

Name Type Default Description
Input will be modified ioState FFmpeg_DecoderState& Object used to maintain state of the function.
Input value inFile const File& File path with the appropriate format, e.g., input.avi
Input value inStartFrameId const Optional<int64> NIL ID of the frame to start the acquisition
Output value outImage Image& Captured frame
Output value outFrameId int64& ID of the captured frame

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 decoder software

This filter is intended to convert video file to series of images using FFmpeg library.

This filter is not able to decode all video formats supported by FFmpeg.