components.io.videofilewriter
- class VideoFileWriter(config={}, **kwds)[source]
Bases:
TransformerWrite video files.
VideoFileWriterhas been superseded byVideoFileWriter2.This component uses FFmpeg to write video to a variety of formats. Make sure you have installed FFmpeg before attempting to use
VideoFileWriter.The trickiest part of configuring
VideoFileWriteris settingencoder. Combinations I’ve found to work on my machine include the following:'-c:v ffv1 -pix_fmt bgr0'– FFV1 lossless encoder, 8-bit colour'-c:v ffv1 -pix_fmt gray'– FFV1, 8-bit luminance'-c:v ffv1 -pix_fmt gray16le'FFV1, 16-bit luminance'-c:v libx264 -pix_fmt yuv444p -qp 0'– “lossless” H264'-c:v libx264 -pix_fmt yuv444p -qp 0 -preset veryslow'– same as above?
I’d be interested to hear of any other good combinations. Email me at the address shown below.
Config
pathstr
Path name of file to be created.
encoderstr
A string of
ffmpegoptions.fpsint
Video frame rate. Only affects how file is replayed.
16bitbool
Attempt to write precision than normal 8-bit range.
Comments or questions? Please email jim@jim-easterbrook.me.uk.