update
This commit is contained in:
parent
2546e94355
commit
e467a76dde
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
device_name=`cat /home/pi/device_name`
|
device_name=`cat /home/pi/device_name`
|
||||||
/usr/bin/ffmpeg -loglevel quiet -rtsp_transport tcp -re -i "rtsp://admin:lihai123@192.168.0.123:554/cam/realmonitor?channel=1&subtype=0" -c copy -f rtsp -rtsp_transport tcp rtsp://47.108.186.87:554/live/$device_name
|
nohup /usr/bin/ffmpeg -loglevel quiet -rtsp_transport tcp -re -i "rtsp://admin:lihai123@192.168.0.123:554/cam/realmonitor?channel=1&subtype=0" -c copy -f rtsp -rtsp_transport tcp rtsp://47.108.186.87:554/live/$device_name > /dev/null 2>&1 &
|
|
@ -3,13 +3,10 @@ import time
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def job():
|
def job():
|
||||||
subprocess.Popen(['supervisorctl restart push_stream'], shell=True)
|
subprocess.Popen(['supervisorctl restart push_stream'], shell=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 每半小时执行一次
|
# 每半小时执行一次
|
||||||
schedule.every(5).minutes.do(job)
|
schedule.every(5).minutes.do(job)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue