-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamera.py
More file actions
31 lines (21 loc) · 882 Bytes
/
Copy pathcamera.py
File metadata and controls
31 lines (21 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import subprocess
import sys
import pty
import os
# vlc rtsp://admin:shouldnotbecomeone@192.168.1.22:554//h264Preview_01_main
def open_camera():
# subprocess.run(["vlc", "rtsp://admin:shouldnotbecomeone@192.168.1.22:554//h264Preview_01_main"])
# pty.spawn(["vlc", "--no-audio", "rtsp://admin:shouldnotbecomeone@192.168.1.22:554//h264Preview_01_main"])
pty.spawn(["bash", "/home/st/scripts/opencamera.sh"])
# new_env = dict(os.environ)
# new_env['DISPLAY'] = '0.0'
#
# subprocess.run(["vlc", "--no-audio", "rtsp://admin:shouldnotbecomeone@192.168.1.22:554//h264Preview_01_main"],
# env=new_env, shell=True)
# DISPLAY=:0
with open("/home/st/Projects/Planner/cameralog", 'w') as f:
f.write("line\r\n")
f.write(sys.argv[2])
# f.write(str(sys.argv))
f.close()
open_camera()