Please note that in your second command you have several arguments (-I, rc and the file name is XYZ.avi), in such cases your cmd variable should be a list of the command you want to run, followed by all arguments for this commands:
Try the following:
import subprocess cmd=['vlc.exe', '-I', 'rc', 'XYZ.avi'] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) output = proc.communicate()[0] print output
If you are not using a script from the right directory, you can specify absolute paths for both vlc.exe and your XYZ.avi in โโcmd var
source share