Kivy Video Player not working

1,404 views
Skip to first unread message

Vitor Villar

unread,
Aug 21, 2018, 10:06:25 AM8/21/18
to Kivy users support

I'm trying this simple example to play a video using Kivy:

from kivy.app import App
from kivy.uix.videoplayer import VideoPlayer


class TestApp(App):
    vid = None

    def replay(self, instance, value):
        if value != "play":
            # self.vid.play = True
            self.vid.state = "play"

    def build(self):
        self.vid = VideoPlayer(source="./S02E02.mp4", state="play")
        # self.vid.bind(state=self.replay)  # When state changes, if not playing, play it
        return self.vid


TestApp().run()

The main window and the video player is shown, \bBut the video is not loaded and played. And I have this as output:

[INFO   ] [Logger      ] Record log in /home/villar/.kivy/logs/kivy_18-08-21_0.txt
[INFO   ] [Kivy        ] v1.10.1
[INFO   ] [Python      ] v3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0]
[INFO   ] [Factory     ] 194 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [Video       ] Provider: null(['video_ffmpeg', 'video_ffpyplayer'] ignored)
[INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] Backend used <gl>
[INFO   ] [GL          ] OpenGL version <b'3.0 Mesa 18.0.5'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel Open Source Technology Center'>
[INFO   ] [GL          ] OpenGL renderer <b'Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2) '>
[INFO   ] [GL          ] OpenGL parsed version: 3, 0
[INFO   ] [GL          ] Shading version <b'1.30'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[ERROR  ] [Image       ] Error reading file ./S02E02.png
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event13
[INFO   ] [MTD         ] Read event from </dev/input/event13>
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event7
[INFO   ] [MTD         ] Read event from </dev/input/event7>
[INFO   ] [Base        ] Start application main loop
[INFO   ] [MTD         ] </dev/input/event13> range position X is 0 - 1228
[INFO   ] [MTD         ] </dev/input/event7> range position X is 1278 - 5664
[INFO   ] [MTD         ] </dev/input/event13> range position Y is 0 - 928
[INFO   ] [MTD         ] </dev/input/event7> range position Y is 1206 - 4646
[INFO   ] [MTD         ] </dev/input/event13> range touch major is 0 - 0
[INFO   ] [MTD         ] </dev/input/event7> range touch major is 0 - 0
[INFO   ] [MTD         ] </dev/input/event13> range touch minor is 0 - 0
[INFO   ] [MTD         ] </dev/input/event7> range touch minor is 0 - 0
[INFO   ] [MTD         ] </dev/input/event13> range pressure is 0 - 255
[INFO   ] [MTD         ] </dev/input/event7> range pressure is 0 - 255
[INFO   ] [MTD         ] </dev/input/event13> axes invertion: X is 0, Y is 0
[INFO   ] [MTD         ] </dev/input/event7> axes invertion: X is 0, Y is 0
[INFO   ] [MTD         ] </dev/input/event13> rotation set to 0
[INFO   ] [MTD         ] </dev/input/event7> rotation set to 0
[ERROR  ] [Image       ] Error loading texture ./S02E02.mp4
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [Base        ] Leaving application in progress...

The video file S02E02.mp4 is in the same directory as the python script.

The kivy version I use is 1.10.1, with Python 3.6 and Ubuntu 18.04. I installed Kivy using pip3

Does anybody knows why the video is not playing?

Skaft

unread,
Aug 22, 2018, 11:54:31 AM8/22/18
to Kivy users support
Hello!

The log suggests you don't have a video provider (null). Do you have gstreamer installed? This step is listed as optional in the installation instructions, so perhaps try adding that part. Your code runs fine for me, anyway =)

Vitor Villar

unread,
Aug 22, 2018, 1:28:37 PM8/22/18
to Kivy users support
Hello, thanks for your response! But I already have gstreamer installed. I ran the command apt-get install to check and the packages are already installed.

Any other ideas?

Gabriel Pettier

unread,
Aug 26, 2018, 12:51:45 PM8/26/18
to kivy-...@googlegroups.com
Did you install the gstreamer headers and made sur to build kivy after?

If the question doesn't seem to make sense to you, how did you install
kivy, and how did you install gstreamer?

Best
On Wed, Aug 22, 2018 at 10:28:37AM -0700, Vitor Villar wrote:
>Hello, thanks for your response! But I already have gstreamer installed. I
>ran the command apt-get install to check and the packages are already
>installed.
>
>Any other ideas?
>
>On Wednesday, August 22, 2018 at 5:54:31 PM UTC+2, Skaft wrote:
>>
>> Hello!
>>
>> The log suggests you don't have a video provider (null). Do you have
>> gstreamer installed? This step is listed as optional in the installation
>> instructions <https://kivy.org/docs/installation/installation-linux.html>,
>> so perhaps try adding that part. Your code runs fine for me, anyway =)
>>
>>
>>
>> Den tisdag 21 augusti 2018 kl. 16:06:25 UTC+2 skrev Vitor Villar:
>>>
>>> I'm trying this simple example to play a video using Kivy:
>>>
>>> from kivy.app import Appfrom kivy.uix.videoplayer import VideoPlayer
>--
>You received this message because you are subscribed to the Google Groups "Kivy users support" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
>To post to this group, send email to kivy-...@googlegroups.com.
>Visit this group at https://groups.google.com/group/kivy-users.
>To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/32ac97d7-5d52-45c8-b218-8b9e6170228c%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages