I have an oddly specific problem, though aren't they all? I have a RPi 3B+ on stretch that I'm trying to boot into a python script that I've written that receives an integer and passes it to two Arduino slaves. At the same time, I'm trying to have a video open, play, and close when finished based on the integer entered.
I've looked into both opencv and oxmplayer solutions, but I didn't get very far with other (I'm missing some opencv dependency and oxmplayer refuses to download).
Here is the script I've written to load on boot up:
import serial import serial.tools.list_ports import subprocess def getArduinos(): ports = [ p.device for p in serial.tools.list_ports.comports() if '9025' == str(p.vid) ] return ports ports = getArduinos() #get the command from the user command = input("input the command 1 - 5 (5 to quit): ") while(command != 5): ser = serial.Serial(ports, 9600) ser2 = serial.Serial(ports, 9600) #send the command ser.write((str(command) + "\n").encode()) ser2.write((str(command) + "\n").encode()) #interpret the command if(command == 1): #use this command to play the video and fill in the file name subprocess.call(["./shell_script_to_call"]) command = input("Enter another command: ")