Play Video from url in kivy

116 views
Skip to first unread message

Charles longwe

unread,
Feb 6, 2023, 1:54:49 AM2/6/23
to Kivy users support
can someone help on how can I play or load video from URL in kivy Video widget.
thanks in advance

Elliot Garbus

unread,
Feb 6, 2023, 12:13:23 PM2/6/23
to kivy-...@googlegroups.com

Here is an example:

 

from kivy.app import App
from kivy.lang import Builder

kv =
"""
BoxLayout:
    orientation: 'vertical'
    Label:
        text: 'Video Test'
        size_hint_y: None
        height: dp(30)
    Video:     
        id:player
        source: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
        allow_stretch: True
    ToggleButton:
        size_hint_y: None
        height: dp(48)
        on_state: player.state = {'normal': 'pause', 'down': 'play'} [self.state]
        text: {'normal': 'Play Video', 'down': 'Pause Video'} [self.state]
"""


class WatchVideoApp(App):
   
def build(self):
       
return Builder.load_string(kv)


WatchVideoApp().run()

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/f470ade7-1502-4f67-8ac1-c97cf8f76e5en%40googlegroups.com.

 

Message has been deleted

Charles longwe

unread,
Feb 7, 2023, 2:56:56 PM2/7/23
to Kivy users support
linking to any video file it works but with flask url it does not

Elliot Garbus

unread,
Feb 7, 2023, 4:17:51 PM2/7/23
to kivy-...@googlegroups.com

What is the “flask” url returning?  How does it differ from what a video file url?  Sounds like flask is not providing the correct endpoint.

Reply all
Reply to author
Forward
0 new messages