components.io.videofilewriter2
- class VideoFileWriter2(config={}, **kwds)[source]
Bases:
ComponentWrite video files, including “raw” format.
This component uses FFmpeg to write video to a variety of formats. Make sure you have installed FFmpeg before attempting to use
VideoFileWriter2.There are two configuration settings that control the saved file format.
codecchooses a codec “family” such as'FFV1'andpix_fmtchooses the data layout before compression. The “container” format, such asAVIorMOV, is inferred from the file name extension. Not all codecs will work with all pixel formats, and FFmpeg supports many more pixel formats (and codecs) that are available inVideoFileWriter2. Let me know if you have any particular requirements that are not already included.The
rawandffv1codecs are lossless, but look out for unwanted RGB<->YUV conversion or UV resampling.H264always converts to YUV,H264rgbalways converts to RGB.The
input_Y_RGBinput accepts images with 1 or 3 components as Y or RGB. Theinput_UVinput accepts UV images with 2 components. Theinputconfig specifies the expected inputs.Config
pathstr
Path name of file to be written.
inputstr
The input video format. Can be
'RGB','YUV', or'Y'.codecstr
Codec name. Possible values:
'raw','FFV1','H264','H264rgb'.pix_fmtstr
Pixel format. Possible values:
'rgb24','rgb48le','uyvy422','yuv422p','yuv422p10le','gray','gray16le'.fpsint
Video frame rate. Only affects how file is replayed.
- inputs = ['input_Y_RGB', 'input_UV']
Comments or questions? Please email jim@jim-easterbrook.me.uk.