Quick search

Table Of Contents

Video

Core class for reading video files and managing the kivy.graphics.texture.Texture video.

Changed in version 1.9.2: The pyglet, pygst and gi providers have been removed.

Changed in version 1.8.0: There is now 2 distinct Gstreamer implementation: one using Gi/Gst working for both Python 2+3 with Gstreamer 1.0, and one using PyGST working only for Python 2 + Gstreamer 0.10.

Note

Recording is not supported.

class kivy.core.video.VideoBase(**kwargs)[source]

Bases: kivy.event.EventDispatcher

VideoBase, a class used to implement a video reader.

Parameters:
filename: str

Filename of the video. Can be a file or an URI.

eos: str, defaults to ‘pause’

Action to take when EOS is hit. Can be one of ‘pause’, ‘stop’ or ‘loop’.

Changed in version unknown: added ‘pause’

async: bool, defaults to True

Load the video asynchronously (may be not supported by all providers).

autoplay: bool, defaults to False

Auto play the video on init.

Events:
on_eos

Fired when EOS is hit.

on_load

Fired when the video is loaded and the texture is available.

on_frame

Fired when a new frame is written to the texture.

duration

Get the video duration (in seconds)

filename

Get/set the filename/uri of the current video

load()[source]

Load the video from the current filename

pause()[source]

Pause the video

New in version 1.4.0.

play()[source]

Play the video

position

Get/set the position in the video (in seconds)

seek(percent)[source]

Move on percent position

state

Get the video playing status

stop()[source]

Stop the video playing

texture

Get the video texture

unload()[source]

Unload the actual video

volume

Get/set the volume in the video (1.0 = 100%)