Jan-07-2019, 03:58 AM
Ok I figured it out. It seems like the issues were more with the VLC command I was using than with python or the echo calls. Instead of connecting to a unix socked I followed this suggestion to use a tcp socket instead. I used the '&' sign and the -q flag to close the netcat shell after each command.
I guess this is much cleaner than what I was trying to do to begin with.
Thank you very much for your help! (and patience)
I guess this is much cleaner than what I was trying to do to begin with.
Thank you very much for your help! (and patience)
p=subprocess.run('vlc -I rc --rc-host localhost:11337 video01.mp4 -d &',shell=True) p=subprocess.run('vlc -I rc --rc-host localhost:11338 video02.mp4 -d &',shell=True) time.sleep(10) p=subprocess.run('echo pause | netcat -q 0 localhost 11337 &', shell=True) p=subprocess.run('echo pause | netcat -q 0 localhost 11338 &', shell=True) time.sleep(2) p=subprocess.run('echo seek 1 | netcat -q 0 localhost 11337 &', shell=True) p=subprocess.run('echo seek 1 | netcat -q 0 localhost 11338 &', shell=True) time.sleep(2) p=subprocess.run('echo pause | netcat -q 0 localhost 11337 &', shell=True) p=subprocess.run('echo pause | netcat -q 0 localhost 11338 &', shell=True)