updated to version 0.0.3
added vision daemon which runs in the background added more documentation to vision module now including opencv dependencies in complib package
This commit is contained in:
parent
b06962e955
commit
77c2354c00
12 changed files with 201 additions and 16 deletions
20
compLib/VisionDaemon.py
Normal file
20
compLib/VisionDaemon.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import os
|
||||
|
||||
import systemd.daemon
|
||||
import LogstashLogging
|
||||
from LogstashLogging import logstash_logger
|
||||
import logging
|
||||
|
||||
__run = """raspivid -t 0 -b 10000000 -w 1920 -h 1080 -fps 30 -n -o - | gst-launch-1.0 fdsrc ! video/x-h264,width=1280,height=720,framerate=30/1,noise-reduction=1,profile=high,stream-format=byte-stream ! h264parse ! queue ! flvmux streamable=true ! rtmpsink location=\"rtmp://localhost/live/stream\""""
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
systemd.daemon.notify(systemd.daemon.Notification.READY)
|
||||
except:
|
||||
logstash_logger.warning("Warning, old systemd version detected")
|
||||
systemd.daemon.notify('READY=1')
|
||||
|
||||
logging.info("starting gstreamer background process")
|
||||
os.system(__run)
|
||||
logstash_logger.error("gstreamer stopped...")
|
Reference in a new issue