I have the following command which works without issue in the Windows CLI:
"G:\VLC\vlc" --dshow-vdev="Video (00 Pro Capture HDMI 4K+)" --dshow-size=1920x1080 -V dummy --intf=dummy --dummy-quiet --video-filter=scene --no-audio --scene-path="C:\<User>\My location" --scene-format=jpeg --scene-prefix=test_file --scene-replace --run-time=1 --scene-ratio=24 "dshow://" vlc://quit
This takes a snapshot of whatever my capture card is displaying and saves this to file. When I try the same with Python as so:
import os
import subprocess
path = "C:\\<User>\\My location"
fname = "test_file"
os.chdir('G:\\VLC')
process = subprocess.Popen(['vlc', ' --dshow-vdev="Video (00 Pro Capture HDMI 4K+)"', ' --dshow-size=1920x1080', ' -V dummy', ' --intf=dummy', \
' --dummy-quiet', ' --video-filter=scene', \
' --no-audio' ,path, ' --scene-format=jpeg', ' --scene-prefix=', fname, \
' --scene-replace', ' --run-time=1', ' --scene-ratio=24', ' "dshow://"', ' vlc://quit'])
I get the following in the VLC log and no screenshot captured:
filesystem error: cannot open file G:\VLC\ --dshow-vdev="Video (00 Pro Capture HDMI 4K+)" (Invalid argument)
dvdnav error: Could not open G:\VLC\ --dshow-vdev="Video (00 Pro Capture HDMI 4K+)" with libdvdcss.
dvdnav error: Can't open G:\VLC\ --dshow-vdev="Video (00 Pro Capture HDMI 4K+)" for reading
dvdnav error: vm: failed to open/read the DVD
Can anyone explain to me what the issue is?