vision daemon now streams with a resolution of 1280x720

fixed package install
This commit is contained in:
Joel 2021-01-23 02:41:19 +01:00
parent 77c2354c00
commit 7e9192072c
No known key found for this signature in database
GPG key ID: BDDDBECD0808290E
3 changed files with 20 additions and 19 deletions

View file

@ -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 \

View file

@ -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__':

View file

@ -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 <<EOT
load_module "modules/ngx_rtmp_module.so";
worker_processes auto;
rtmp_auto_push on;
events {}
rtmp {
server {
listen 1935;
listen [::]:1935 ipv6only=on;
application live {
live on;
record off;
}
}
}
EOT
{
echo 'load_module "modules/ngx_rtmp_module.so";'
echo 'worker_processes auto;'
echo 'rtmp_auto_push on;'
echo 'events {}'
echo 'rtmp {'
echo ' server {'
echo ' listen 1935;'
echo ' listen [::]:1935 ipv6only=on;'
echo ' application live {'
echo ' live on;'
echo ' record off;'
echo ' }'
echo ' }'
echo '}'
} >> /etc/nginx/nginx.conf