|
|
@ -65,14 +65,15 @@ class Photography(Bureau):
|
|
|
|
#subprocess.check_output(cmd1.split())
|
|
|
|
#subprocess.check_output(cmd1.split())
|
|
|
|
modpath = os.path.dirname(__file__)
|
|
|
|
modpath = os.path.dirname(__file__)
|
|
|
|
mjpg = os.path.join(modpath, "..", "..", "lib", "mjpg-streamer",
|
|
|
|
mjpg = os.path.join(modpath, "..", "..", "lib", "mjpg-streamer",
|
|
|
|
"mjpg-streamer-experimental", "mjpg_streamer")
|
|
|
|
"mjpg-streamer-experimental", "run.sh")
|
|
|
|
mjpg_dir = os.path.dirname(mjpg)
|
|
|
|
mjpg_dir = os.path.dirname(mjpg)
|
|
|
|
cmd = mjpg.split() + ["-i", "input_uvc.so -r 3264x2448 -n", "-o", "output_file.so -f /tmp/webcam -d 500 -s 2"]
|
|
|
|
cmd = mjpg.split() + ["-i", "input_uvc.so -r 3264x2448 -n", "-o", "output_file.so -f /tmp/webcam -d 500 -s 2"]
|
|
|
|
|
|
|
|
|
|
|
|
print(cmd)
|
|
|
|
print(cmd)
|
|
|
|
proc = subprocess.Popen(cmd, shell=True, env={"LD_LIBRARY_PATH": mjpg_dir})
|
|
|
|
#proc = subprocess.Popen(cmd, shell=True, env={"LD_LIBRARY_PATH": mjpg_dir})
|
|
|
|
|
|
|
|
proc = subprocess.Popen(cmd)
|
|
|
|
time.sleep(2)
|
|
|
|
time.sleep(2)
|
|
|
|
proc.kill()
|
|
|
|
proc.terminate()
|
|
|
|
time.sleep(1)
|
|
|
|
time.sleep(1)
|
|
|
|
|
|
|
|
|
|
|
|
# copy last image to the tmpfile
|
|
|
|
# copy last image to the tmpfile
|
|
|
|