kivy: [ERROR ] [ffpyplayer ] C:\Users\Furkan\Desktop\music_project\data\arp.wav: Protocol not found

Software Versions

  • Python: 3.6.7
  • OS: Windows 8.1
  • Kivy: 1.11.0
  • Kivy installation method: pip

Describe the bug

I cannot play my arp.wav file with ffpyplayer. I have installed ffpyplayer with pip (pip install ffpyplayer) but I couldn’t compiled it (https://matham.github.io/ffpyplayer/installation.html) and I guess thats why it gives an error. I need a simple instruction of installing ffpyplayer because I am new to Kivy 😦.

By the way I have tried SDL2 but it does not have get_pos() and seek() methods available (I need them). Gstplayer starts songs with noticable delay so I have to use ffpyplayer guys…

Expected behavior

I expect to play my audio file when I click the button with ffpyplayer.

Code and Logs and screenshots

// import os
os.environ['KIVY_AUDIO'] = 'ffpyplayer'

from kivymd.app import MDApp
from kivymd.uix.screen import Screen
from kivy.uix.togglebutton import ToggleButton
from kivymd.uix.gridlayout import MDGridLayout
from kivy.core.audio import Sound,SoundLoader
from kivy.clock import Clock
from kivy.lang import Builder

kv = """
<MyScreen>:
    MDGridLayout:
        cols:2
        id: mdgridlayout
        ToggleButton
            id:button_arp
            text:"arp"
            on_state:root.play_or_stop(self.state,root.arp)
"""

class MyScreen(Screen):
    
    def __init__(self, **kw):
        super().__init__(**kw)
        
        self.arp = SoundLoader.load("data\\arp.wav")
        self.a = 0

    def play_or_stop(self,state,song):
        if state == "down":
            song.play()
            song.seek(self.a)
            song.loop = True
        else:
            song.stop()

    def show_song_pos(self,*args):

        self.a = self.arp.get_pos()
        self.ids.button_arp.text = "Arp" + str(self.a)

class DemoApp(MDApp):
    def build(self):
        root = MyScreen()
        Clock.schedule_interval(root.show_song_pos,0.1)
        return root

if __name__ == "__main__":
    Builder.load_string(kv)
    DemoApp().run()

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

You entered dll hell!!. This used to be very common for kivy gstreamer until we switched to using msvc gstreamer builds and started pushing users to only install into a clean virtualenv.