Input and output plugins

This section lists all input and output plugins which are included in the OpenVIP distribution.

When importing a file in the OpenVIP Editor, an appropriate input plugin is chosen automatically. If you are processing files using the command line interpeter (see Using OpenVIP from command line), you can override the autodetection mechanism by specifying the format parameter, which forces OpenVIP to use the given plugin.

FFMpegInput

The FFMpegInput plugin reads multimedia files using the FFmpeg libraries, which provide support for a wide range of codecs and file formats (see FFmpeg documentation); this means that you don't need to install any codecs separately.

FFMpegInput plugin has been tested with AVI, DV, MOV, MPEG, MP3, VOB, WMA, and WMV file formats. These formats can be imported in the OpenVIP Editor; other formats supported by FFmpeg can be processed only using the command line interpreter (see Using OpenVIP from command line).

Network parameters

The following table lists the plugin's parameters in network file format.

Table 4.80. FFMpegInput parameters

ParameterValuesDescriptionRequired
formatFFMpegplugin nameno
filenamevalid filenamefile to loadyes

If you don't set the format parameter to FFMpeg, only the formats listed above are accepted; otherwise you can read all files supported by FFmpeg libraries.

Implementation notes

When opening a multimedia file for the first time, FFMpegInput plugin creates a so-called index file, which contains information about keyframes, samples, etc. Note that creating index can take a few minutes for large (hundreds of MB) multimedia files. The index files are stored in the system temp directory and can be deleted using the clear_cache script from the OpenVIP distribution.

FFMpegOutput

The FFMpegOutput plugin writes multimedia files using the FFmpeg libraries, which provide support for a wide range of codecs and file formats (see FFmpeg documentation); this means that you don't need to install any codecs separately.

Network parameters

The following table lists the plugin's parameters in network file format.

Table 4.81. FFMpegOutput parameters

ParameterValuesDescriptionRequired
formatFFMpegplugin nameyes
filenamestringvalid filenameyes
file_formatstringoutput file formatno
video_codecstringvideo codecno
video_bitrateintegerbitrate in kbpsno
audio_codecstringaudio codecno
audio_bitrateintegerbitrate in kbpsno

If you don't specify the file_format parameter, FFmpeg will automatically guess a suitable one according to the filename extension. The same is true for the codec and bitrate parameters. All supported formats and codecs are listed in the FFmpeg documentation.

WavInput

The WavInput plugin is able to read uncompressed WAV files that contain either 8-bit unsigned or 16-bit signed samples.

Network parameters

The following table lists the plugin's parameters in network file format.

Table 4.82. WavInput parameters

ParameterValuesDescriptionRequired
formatWavplugin nameno
filenamestringexisting filenameyes

WavOutput

The WavOutput plugin writes uncompressed WAV files that contain 16-bit signed samples (mono or stereo).

Network parameters

The following table lists the plugin's parameters in network file format.

Table 4.83. WavOutput parameters

ParameterValuesDescriptionRequired
formatWavplugin nameyes
filenamestringvalid filenameyes

ImageInput

The ImageInput plugin can read sequences of bitmap files using the ImageMagick library. It supports JPEG, PNG, GIF and many other formats.

Network parameters

The following table lists the plugin's parameters in network file format.

Table 4.84. ImageInput parameters

ParameterValuesDescriptionRequired
formatImageforces the use of this pluginno
filenamestringwildcard filemaskyes
sorttypestringalphabetical or numerical (default: alphabetical)no
fpsreal numberframes per second of the output video stream (default: 1)no
output_lengthintegernumber of frames in the output video streamno
be_smartbooleantry to load a whole sequence based on the name of a single image (default: on)no
allow_varying_dimensionsbooleandon't insist on input images having the same dimension (default: off)no

The filename parameter can be specified as a wildcard mask with ? and * symbols. All files that match the wildcard mask will be loaded.

When given a file name in the form of <prefix><number>[<extension>], the plugin will load all files with the same prefix and extension provided be_smart is turned on.

The order in which the images are loaded is determined by the sorttype parameter - to load the sequence img10.jpg, img3.jpg, img7.jpg in the correct order img3.jpg, img7.jpg, img10.jpg you have to switch to numerical sorting.

The value of output_length can be greater than the actual number of files available on disk. In this case the plugin repeats the files from beginning. For example, if there are two files img1.jpg and img2.jpg available on disk and you specify output_length=5, the output stream will consist of img1.jpg, img2.jpg, img1.jpg, img2.jpg, img1.jpg.

A videostream in which frames have various dimensions is by all means invalid. Therefore set the allow_varying_dimensions parameter to true only if you are sure that the following plugins can handle it.

ImageOutput

This plugin writes a sequence of numbered bitmap files using the ImageMagick library. It supports JPEG, PNG, GIF and many other formats.

Network parameters

The following table lists the plugin's parameters in network file format.

Table 4.85. ImageOutput parameters

ParameterValuesDescriptionRequired
formatImageselects this pluginyes
filenamestringwildcard filemaskyes
numwidthintegera minimal width (in digits) of the number in an output file nameno

If the filename parameter contains an asterisk, it will be replaced by the image number in the output file names. If the filename doesn't contain an asterisk, the number will be placed right before the extension. The numbering always starts from zero.

In case you supply the numwidth parameter the numbers will be left-padded with zeros to have the required number of digits. Otherwise the width is determined by the length of the greatest number.

AviInput

AviInput plugin reads AVI files using the Video for Windows functions (and thus can be used only in Windows).

Network parameters

The following table lists the plugin's parameters in network file format.

Table 4.86. AviInput parameters

ParameterValuesDescriptionRequired
formatAviforces the use of this pluginno
filenamestringa valid filenameyes

Currently this plugin cannot open palleted files, only truecolor ones (which is most of them anyway). It also cannot open files with variable bitrate MP3 audio, but FFMpegInput can.