0

I'm running some media files in my Raspberry, with this code:

while True :
    try:
        response = input
        print(response)
        if (response=='playvideo1'):
            print("playvideo1") #first condition I need
            player= vlc.MediaPlayer('/home/pi/Downloads/video1.mp4')
            player.play()
            player.set_fullscreen(True)
        elif(response=='playvideo2'):
            print("playvideo2") #second condition that I need
        elif(response=='playvideo3'):
            print("playvideo3") #third condition that I need
    except:
        pass

It runs and plays the video but in the terminal is giving me this error:

playvideo1
[a1526cc8] mmal_codec decoder: VCSM init succeeded: CMA
[a1526cc8] main decoder error: buffer deadlock prevented
'playvideo2'
playvideo2
[00dfbd10] xcb_window window error: X server failure

Also, there is some way to play a video if the input is not any of my conditions? like: response ==''

Dharman
  • 30,962
  • 25
  • 85
  • 135

0 Answers0