I have the following code
pathToFile = "R:\T2 Output\12345--01--Some File 1--ABCD.mp4"
process = subprocess.Popen(['ffprobe.exe', '-show_streams', '"'+pathToFile+'"'],
shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
I get the error:
[Error 2] The system cannot find the file specified
What I have tried:
- Changing shell=True to shell=False
- Combining the command into a single string instead of using a list (I even print it to screen, and I can copy and paste into a command prompt where the file runs and gives the expected output (no error)
- I made sure that ffprobe.exe is located in the PATH and can be executed from the command line without specifying a directory
Things of note:
- The file is located on a mapped network drive (R)
- The file has spaces in the filename, this is why I surrounded it by quotes.
I'm sure I'm missing something simple. Can anyone point me in the right direction? I've done quite a lot of searching on this site and others and trying suggestions.