Phaedro Stefanidis
Phaedro Stefanidis

Reputation: 51

Kivy not loading video

I'm using the following code using kivy, trying to load a video. I created a new file that didn't have all the extra things I was doing, as to eliminate all the possible complications. I'm new to stack overflow, so if I've done something wrong don't judge...The video is in the same file, and I've tried everything I found online about these kind of errors, I've also installed pillow and ffpyplayer. The error I receive is [ERROR ] [Image ] Error loading <ironman.mp4>

import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.lang import Builder
from kivy.uix.screenmanager import Screen, ScreenManager
from kivy.uix.video import Video
from kivy.uix.videoplayer import VideoPlayer






class MyApp(App):
    def build(self):

        video = Video(source='ironman.mp4')
        video.state = "play"
        video.options = {'eos': 'loop'}
        video.allow_stretch = True
        video.loaded = True

        return video

if __name__ == "__main__":
    MyApp().run()

Upvotes: 5

Views: 2872

Answers (3)

Ooze Zone
Ooze Zone

Reputation: 21

Installing ffpyplayer fixed the issue for me. Run

pip install ffpyplayer

Upvotes: 1

Fabien Samson
Fabien Samson

Reputation: 11

Had the same issue on W11, installing kivy-deps.gstreamer 0.3.3 fixed it.

Upvotes: 0

Mateusz
Mateusz

Reputation: 3

I had the same problem but with Image. Install pillow 8.4.0.

Upvotes: 0

Related Questions