|
Edited by 1541040112 at 2018-11-1 11:15 AM
1. The double '\\' means the second '\' isn't a special character.
Example:
If you want to out print "
python code: print(' " ') or print(" \" ")
besides, on windows OS, if there are spaces in a path, you need to use "path" instead of 'path'.
2. I write a python code to test the VLC function.
#
import subprocess
def import_path(initial):
with open("VLC.txt") as f:
for line in f.readlines():
if(line.find(initial) == 0):
r=line
begin=len(list(initial))
snum=r[begin:]
n=snum
return n
vlc_path=import_path('addr:')
cmdline = [vlc_path, '--demux', 'h264', '-']
player = subprocess.Popen(cmdline, stdin=subprocess.PIPE)
#
You can simply run this code to see if the VLC.exe runs.
remember to put this .py in the same folder as VLC.txt in.
If VLC media player runs, then there may be other error that I can't think of for now.
If VLC media player doesn't run, check the path in VLC.txt again, make sure the format is right. or you can tell me where the VLC.exe is and I help you to change the VLC.txt.
thanks
|
|