From 7e9192072cf1063cdddd3690d74a1fa2938f483c Mon Sep 17 00:00:00 2001 From: Joel Date: Sat, 23 Jan 2021 02:41:19 +0100 Subject: [PATCH] vision daemon now streams with a resolution of 1280x720 fixed package install --- build_deb.sh | 3 ++- compLib/VisionDaemon.py | 2 +- postinstall.sh | 34 +++++++++++++++++----------------- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/build_deb.sh b/build_deb.sh index c1961ed..a07e519 100644 --- a/build_deb.sh +++ b/build_deb.sh @@ -27,7 +27,8 @@ fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefi -d "opencv-main" \ -d "opencv-python" \ -d "opencv-scripts" \ - -v 0.0.3-3 -t deb setup.py + -d "libatlas-base-dev" \ + -v 0.0.3-4 -t deb setup.py # --deb-changelog changelog \ # --deb-upstream-changelog changelog \ diff --git a/compLib/VisionDaemon.py b/compLib/VisionDaemon.py index c08aa1e..e000127 100644 --- a/compLib/VisionDaemon.py +++ b/compLib/VisionDaemon.py @@ -5,7 +5,7 @@ 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\"""" +__run = """raspivid -t 0 -b 5000000 -w 1280 -h 720 -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__': diff --git a/postinstall.sh b/postinstall.sh index 731ed4f..4341230 100644 --- a/postinstall.sh +++ b/postinstall.sh @@ -11,6 +11,7 @@ install_package() { install_package "smbus" install_package "requests" +install_package "flask" install_package "python-logstash-async" echo "Setting up opencv4" @@ -19,20 +20,19 @@ pkg-config --modversion opencv4 echo "Setting up nginx rtmp server" sudo /etc/init.d/nginx start -sudo tee /etc/nginx/nginx.conf > /dev/null <> /etc/nginx/nginx.conf