c4d.bitmaps.MovieSaver

The movie saver class is used for reading and writing movie streams.

Definition

class c4d.bitmaps. MovieSaver

Members

MovieSaver. __init__ ( )
Return type: c4d.bitmaps.MovieSaver
Returns: The new movie saver
MovieSaver. Open ( name , bm , fps , format , data , savebits )

Opens a movie stream to the file name . The resolution and bit depth are defined by the first frame in bm . The framerate is specified by fps .

Parameters:
  • name (str or MemoryFileStruct ) – A file.
  • bm ( c4d.bitmaps.BaseBitmap ) – A typical frame of the movie, used for dimensions.
  • fps ( int ) – The frame rate in frames per second
  • format ( int ) –

    The file format. Valid values are:

    FILTER_AVI AVI movie
    FILTER_MOVIE Quicktime movie
  • data ( c4d.BaseContainer ) –

    Additional settings for the file format.

    (Please see the documentation for the AVI and Quicktime format for more information.)

    AVISAVER_FCCTYPE unknown
    AVISAVER_FCCHANDLER unknown
    AVISAVER_LKEY unknown
    AVISAVER_LDATARATE unknown
    AVISAVER_LQ unknown
    QTSAVER_COMPRESSOR unknown
    QTSAVER_QUALITY unknown
    QTSAVER_TEMPQUAL unknown
    QTSAVER_FRAMERATE unknown
    QTSAVER_KEYFRAMES unknown
    QTSAVER_PLANES unknown
    QTSAVER_DATARATE unknown
    QTSAVER_FRAMEDURATION unknown
    QTSAVER_MINQUALITY unknown
    QTSAVER_MINTEMPQUAL unknown
    QTSAVER_FIXEDFRAMERATE unknown
  • savebits ( int ) –

    Can be a combination of the following flags:

    SAVEBIT_0 No flags.
    SAVEBIT_ALPHA Save the alpha channel(s) in the file. (For filter plugins, do not save an alpha channel if this is not set.)
    SAVEBIT_MULTILAYER Save multiple layers.
    SAVEBIT_USESELECTEDLAYERS Use selected layers.
    SAVEBIT_16BITCHANNELS Use 16 bit channels.
    SAVEBIT_GREYSCALE Save in grayscale mode.
    SAVEBIT_INTERNALNET Private.
    SAVEBIT_DONTMERGE Avoid merging of layers in B3D files.
    SAVEBIT_32BITCHANNELS Use 32 bit channels.
    SAVEBIT_SAVERENDERRESULT Private.
    SAVEBIT_FIRSTALPHA_ONLY Private.
MovieSaver. Close ( )

Close the movie file.

MovieSaver. Write ( bm )

Adds another frame to the end of the movie stream.

Parameters: bm ( BaseBitmap <c4d.bitmaps.BaseBitmap> ) – The frame to add
Return type: int
Returns: The result. Possible values are:
IMAGERESULT_OK Image loaded/created.
IMAGERESULT_NOTEXISTING Image doesn`t exist.
IMAGERESULT_WRONGTYPE Image has the wrong type.
IMAGERESULT_OUTOFMEMORY Not enough memory.
IMAGERESULT_FILEERROR File error.
IMAGERESULT_FILESTRUCTURE Invalid file structure.
IMAGERESULT_MISC_ERROR Unknown error.
IMAGERESULT_PARAM_ERROR Parameter error.
IMAGERESULT_THREADCANCELED

New in version R17.032.

Thread canceled while working.

MovieSaver. Choose ( format , bc )

Note

The arguments might change in the future.

Opens the standard compression chooser for movie formats. The new settings are stored in bc if the user clicks ok:

data = c4d.BaseContainer()
action = ms.Choose(c4d.FILTER_AVI, data)
if action==False: return #is True if the user canceled the dialog
ms.Open(..., data, ...)
							
Parameters:
  • format ( int ) –

    The file format. Valid values are:

    FILTER_AVI AVI movie
    FILTER_MOVIE Quicktime movie
  • bc ( c4d.BaseContainer ) – Used to pass the default settings, and to read the settings the user has chosen.

Table Of Contents