c4d.bitmaps.MovieLoader

class c4d.bitmaps.MovieLoader

The movie loader class is used for reading movie streams.

Methods Signatures

MovieLoader.__init__()

MovieLoader.Open()

Open a movie file.

MovieLoader.Close()

Close the movie file.

MovieLoader.GetInfo()

Return information about the movie.

MovieLoader.Read()

Read an image from the movie.

Methods Documentation

MovieLoader.__init__(self)
MovieLoader.Open(self, fn)

Open a movie file.

Parameters

fn (Union[str, c4d.storage.MemoryFileStruct]) – The file.

MovieLoader.Close(self)

Close the movie file.

MovieLoader.GetInfo(self)

Return information about the movie.

framecount, fps = ml.GetInfo()
Return type

Tuple[int, float]

Returns

Frame and FPS

MovieLoader.Read(self, new_frame_idx)

Read an image from the movie.

framecount, fps = ml.GetInfo()
for frame in range(framecount):
    result, image = ml.Read(frame)
    #when result is not IMAGERESULT_OK...
    #...image is None.
    if result != c4d.IMAGERESULT_OK:
        break

    pass
Parameters

new_frame_idx (int) – The frame number of the frame to be read.

Return type

Optional[Tuple[int, c4d.bitmaps.BaseBitmap]]

Returns

The IMAGERESULT and the bitmap or None.