vlc.exe -vvv rtsp://192.168.1.3/11 --sout "#transcode{vcodec=MJPG,vb=1000,width=1280,height=720}:duplicate{dst=std{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8090/cam.mjpg}}" --color -I dummy
6. Turn On/Off beep – Toggle the UPS beeper
def spawn(cmd, *args):
argv = [cmd] + list(args)
pid = None
global children
global processes
try:
process = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
pid = process.pid
children[pid] = {'pid': pid, 'cmd': argv}
processes[pid] = process
except Exception, inst:
print "'%s': %s" % ("".join(argv), str(inst))
return pid
... ... ... ...
while len(jobs) > 0 or len(children):
(pid, status) = os.wait()
output,error = processes[pid].communicate()
# print output
# print error
# print children[pid]['output']
del children[pid]
if len(children) < maxjobs and len(jobs):
cmd = jobs[0]
if spawn(*cmd):
del jobs[0]
Traceback (most recent call last):
File "./pycurl1.py", line 56, in ?
output,error = processes[pid].communicate()
File "/usr/lib64/python2.4/subprocess.py", line 1070, in communicate
self.wait()
File "/usr/lib64/python2.4/subprocess.py", line 1027, in wait
pid, sts = os.waitpid(self.pid, 0)
OSError: [Errno 10] No child processes