kivy: чёрный экран при воспроизведении видео
Я хочу сделать так, чтобы мою программу можно было запускать только на определённых компьютерах. Я делаю проверку по mac адресу и хочу чтобы если mac адрес не совпадал с положенным, то воспроизводился скример. С видео в kivy я никогда не работал но понял что нужно установить kivy[media] после установки ничего не изменилось как был чёрный экран так и остался
main.py:
from kivy.config import Config
Config.set('graphics', 'width', 1500)
Config.set('graphics', 'height', 800)
Config.set('graphics', 'resizable', 0)
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.screenmanager import ScreenManager, Screen, SlideTransition, NoTransition
from kivy.uix.button import Button
from kivy.uix.textinput import TextInput
from kivy.uix.video import Video
from kivy.graphics import Color, Rectangle
from pyautogui import press
from time import sleep
import uuid
import re
import json
Builder.load_file('main.kv')
def getSystemInfo():
info={}
info['mac-address']=':'.join(re.findall('..', '%012x' % uuid.getnode()))
with open('sysinfo.json', 'w') as w:
json.dump(info, w)
getSystemInfo()
with open('sysinfo.json', 'r') as data:
sysinfo = json.load(data)
class LoginScreen(Screen):
def next(self):
if sysinfo['mac-address'] == 'mac-adress': # заменил реальный
password = self.ids.passwdtext.text
if password == '123456':
self.ids.promtp.text = ''
self.ids.passwdtext.text = ''
self.manager.current = 'main'
else:
self.ids.promtp.text = 'Wrong password'
else:
self.manager.transition = NoTransition()
self.manager.current = 'wrongmac'
class MainScreen(Screen):
pass
class WrongScreen(Screen):
def wrong(self):
self.videovideo = Video(source = 'onlyfans.mp4')
self.video.state = "play"
self.video.options = {'eos':'loop'}
self.video.allow_stretch = True
self.add_widget(self.video)
sm = ScreenManager()
sm.add_widget(LoginScreen(name='login'))
sm.add_widget(WrongScreen(name='wrongmac'))
sm.add_widget(MainScreen(name='main'))
class L0QApp(App):
def build(self):
return sm
if __name__ == '__main__':
L0QApp().run()
main.kv:
<LoginScreen>:
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: 'background.png'
FloatLayout:
Label:
id: promtp
text: ''
font_size: 16
size_hint: .4, .1
pos_hint: {'center_x': .5, 'center_y': .7}
TextInput:
id: passwdtext
text: ''
hint_text: 'Give me key for open the door'
multiline: False
size_hint: .3, .1
pos_hint: {'center_x': .5, 'center_y': .5}
Button:
id: passwdbtn
text: 'Next'
size_hint: .3, .1
pos_hint: {'center_x': .5, 'center_y': .3}
on_press: root.next()
<WrongPassword>:
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: 'background.png'
FloatLayout:
Label:
id: trollpromtp
text: ''
font_size: 16
size_hint: .4, .1
pos_hint: {'center_x': .5, 'center_y': .7}
TextInput:
id: trolltext
text: ''
hint_text: 'Give me key for open the door'
multiline: False
size_hint: .3, .1
pos_hint: {'center_x': .5, 'center_y': .5}
Button:
id: trollbtn
text: 'Next'
size_hint: .3, .1
pos_hint: {'center_x': .5, 'center_y': .3}
on_press: root.wrong()
<MainScreen>:
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: 'background.png'
FloatLayout:
Label:
id: smsPromtp
text: 'SMS BOMBER'
size_hint: 0.165, 0.068
pos: 25, 700
TextInput:
id: smsNumber
text: ''
hint_text: 'Phone number'
size_hint: 0.165, 0.068
pos: 25, 600
TextInput:
id: smsTime
text: ''
hint_text: 'Time of attack'
size_hint: 0.165, 0.068
pos: 25, 500
TextInput:
id: smsThreads
text: ''
hint_text: 'How many packages'
size_hint: 0.165, 0.068
pos: 25, 400
Button:
id: smsButton
text: 'Execute'
background_color: 0, 0, 0, 1
size_hint: 0.165, 0.068
pos: 25, 300
font_size: 30
Label:
id: emailPromtp
text: 'EMAIL BOMBER'
size_hint: 0.165, 0.068
pos: 325, 700
font_size: 16
TextInput:
id: emailvalue
text: ''
hint_text: 'Email of jertva'
size_hint: 0.165, 0.068
pos: 325, 600
Button:
id: emailButton
text: 'Execute'
background_color: 0, 0, 0, 1
size_hint: 0.165, 0.068
pos: 325, 500
font_size: 30
Label:
id: ddosPromtp
text: 'DDOS BOMBER'
size_hint: 0.165, 0.068
pos: 625, 700
font_size: 16
TextInput:
id: ddosurl
text: ''
hint_text: 'Url of ddos'
size_hint: 0.165, 0.068
pos: 625, 600
Button:
id: ddosbutton
text: 'Execute'
background_color: 0, 0, 0, 1
size_hint: 0.165, 0.068
pos: 625, 500
font_size: 30
Label:
id: vkPromtp
text: 'VK BOMBER'
size_hint: 0.165, 0.068
pos: 925, 700
font_size: 16
TextInput:
id: vkurl
text: ''
hint_text: 'Url of vk human'
size_hint: 0.165, 0.068
pos: 925, 600
Button:
id: vkbutton
text: 'Execute'
background_color: 0, 0, 0, 1
size_hint: 0.165, 0.068
pos: 925, 500
font_size: 30
Label:
id: discordPromtp
text: 'DISCORD BOMBER'
size_hint: 0.165, 0.068
pos: 1225, 700
font_size: 16
TextInput:
id: discordurl
text: ''
hint_text: 'discord#0000'
size_hint: 0.165, 0.068
pos: 1225, 600
Button:
id: discordbutton
text: 'Execute'
background_color: 0, 0, 0, 1
size_hint: 0.165, 0.068
pos: 1225, 500
font_size: 30
TextInput:
id: ConsoleConcept
text: ''
canvas.before:
Color:
rgba: 255, 255, 255, 1
Line:
width: 2
rectangle: self.x, self.y, self.width, self.height
background_color: 0, 0, 0 ,1
size_hint: 0.97, 0.25
pos: 25, 80
font_size: 16
Button:
id: unlogin
text: 'unlogin'
canvas.before:
Color:
rgba: 255, 255, 255, 1
Line:
width: 2
rectangle: self.x, self.y, self.width, self.height
background_color: 0, 0, 0, 1
font_size: 30
size_hint: 0.165, 0.068
pos: 25, 15
on_press: root.manager.current = 'login'
Логи:
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.3.2
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.3.1
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "C:\Users\tntwn\AppData\Local\Programs\Python\Python39\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\tntwn\AppData\Local\Programs\Python\Python39\python.exe"
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [ImageLoaderFFPy] Using ffpyplayer 4.3.2
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_ffpyplayer
[INFO ] [Text ] Provider: sdl2
[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.13596 Compatibility Profile Context
20.10.28.10 27.20.11028.10001'>
[INFO ] [GL ] OpenGL vendor <b'ATI Technologies Inc.'>
[INFO ] [GL ] OpenGL renderer <b'AMD Radeon(TM) Graphics'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60'>
[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
[INFO ] [VideoGstplayer] Using Gstreamer 1.18.4.0
[INFO ] [Video ] Provider: gstplayer
[INFO ] [GL ] NPOT texture support is available
[INFO ] [Base ] Start application main loop