Ошибка:
[ERROR ] [Image ] Error loading texture somevideo.mpg
Фактический результат:
- Произошла ошибка, и я не могу использовать ни один из атрибутов, кроме
play()
Код для справки:
from functools import partial
from kivy.clock import Clock
from kivy.uix.video import Video
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.screenmanager import Screen, ScreenManager
from kivy.app import App
class VideoPlayScreen(Screen):
def __init__(self, **kwargs):
super(VideoPlayScreen, self).__init__(**kwargs)
box_layout = BoxLayout()
self.video1 = Video(source="cityCC0.mpg")
box_layout.add_widget(self.video1)
self.add_widget(box_layout)
def on_enter(self, *args):
print(self.video1.state)
self.video1.state = "play"
print(self.video1.state)
Clock.schedule_interval(partial(print, self.video1.loaded), 0.5)
sm = ScreenManager()
sm.add_widget(VideoPlayScreen(name="video_play"))
sm.current = "video_play"
class OpenCity(App):
def build(self):
return sm
if __name__ == '__main__':
OpenCity().run()
cityCC1.mpg предоставлен kivy. Проверьте это в папке kivy_examples.
RunLog:
[INFO ] [Logger ] Record log in C:\Users\kanna\.kivy\logs\kivy_20-03-01_28.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.1.23
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "F:\Python Kivy\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.6 (tags/v3.7.6:43364a7ae0, Dec 18 2019, 23:46:00) [MSC v.1916 32 bit (Intel)]
[INFO ] [Python ] Interpreter at "F:\Python Kivy\Scripts\python.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [ImageLoaderFFPy] Using ffpyplayer 4.3.0
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_ffpyplayer, img_gif (img_pil ignored)
[INFO ] [VideoGstplayer] Using Gstreamer 1.16.2.0
[INFO ] [Video ] Provider: gstplayer
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.6.0 - Build 26.20.100.7262'>
[INFO ] [GL ] OpenGL vendor <b'Intel'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) UHD Graphics 630'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60 - Build 26.20.100.7262'>
[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 loading texture cityCC0.mpg
[INFO ] [Base ] Start application main loop
stop
play
False 0.9090554999999999
[INFO ] [GL ] NPOT texture support is available
False 0.5063968000000001
False 0.4993861999999998
False 0.49537330000000024
[INFO ] [WindowSDL ] exiting mainloop and closing.
[INFO ] [Base ] Leaving application in progress...
Показывает журнал выполнения в виде кода.
Как всегда, спасибо за прочтение.
На вопрос после этого получите ссылку на pastebin с кодом журнала.