Table Of Contents
Video¶
Core class for reading video files and managing the video
Texture
.
Changed in version 1.10.0: The pyglet, pygst and gi providers have been removed.
Changed in version 1.8.0: There are now 2 distinct Gstreamer implementations: 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 1.4.0: 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.
- property duration¶
Get the video duration (in seconds)
- property filename¶
Get/set the filename/uri of the current video
- property position¶
Get/set the position in the video (in seconds)
- seek(percent, precise=True)[source]¶
Move to position as percentage (strictly, a proportion from 0 - 1) of the duration
- property state¶
Get the video playing status
- property texture¶
Get the video texture
- property volume¶
Get/set the volume in the video (1.0 = 100%)