How to play videos from the web like youtube in kivy

Question:

I really want to create a kivy app that lets me view videos from certain web links. How can I go about doing this, Like having a link to a video then play it in Kivy? I already read the documentation and I don’t get it. Please help.

Asked By: user3672804

||

Answers:

The Video and VideoPlayer widgets are both capable of playing streaming videos from the web. Here’s a simple example of playing a video from the web:

import kivy
kivy.require('1.8.0')

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

root = Builder.load_string('''
VideoPlayer:
    source: 'http://www.debone.com/VivVilConGminorRV578.mpg'
''')

class TestApp(App):
    def build(self):
        return root

if __name__ == '__main__':
    TestApp().run()

This will work for any supported streaming media type. Note, however, that YouTube does not provide streaming URLs. Check my answer here to a question which was specifically asking about YouTube.

Answered By: kitti

it is not working and saying ffmpeg has not attribute named FFVideo

Answered By: Kapil Kumar
Categories: questions Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.