API Reference >> skvideo.io.LibAVWriter
Fork me on GitHub

skvideo.io.LibAVWriter

class skvideo.io.LibAVWriter(*args, **kwargs)[source]

Writes frames using libav

Using libav as a backend, this class provides sane initializations for the default case.

Methods

close()

Closes the video and terminates FFmpeg process

writeFrame(im)

Sends ndarray frames to FFmpeg

__init__(*args, **kwargs)[source]

Prepares parameters

Does not instantiate the an FFmpeg subprocess, but simply prepares the required parameters.

Parameters:
filenamestring

Video file path for writing

inputdictdict

Input dictionary parameters, i.e. how to interpret the data coming from python.

outputdictdict

Output dictionary parameters, i.e. how to encode the data when writing to file.

Returns:
none
close()

Closes the video and terminates FFmpeg process

Raises RuntimeError if FFmpeg exited with a non-zero return code, including its stderr output in the exception message (issue #111). Previously a failing encode produced a silent empty/corrupt output file with no indication of what went wrong.

writeFrame(im)

Sends ndarray frames to FFmpeg