From db7b32aa7fdbfaa5e94991f966d49b9b415c7c4d Mon Sep 17 00:00:00 2001 From: livecam Date: Fri, 14 Aug 2020 20:10:51 +0200 Subject: [PATCH 1/6] backlight_compensation und Cleanup --- cam1/start.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cam1/start.sh b/cam1/start.sh index aa723ad..f960346 100755 --- a/cam1/start.sh +++ b/cam1/start.sh @@ -10,14 +10,16 @@ do_exit() { pkill -9 gst-launch-1.0 } -v4l2-ctl -d /dev/video0 --set-ctrl=power_line_frequency=1 +v4l2-ctl -d /dev/video0 --set-ctrl=power_line_frequency=1 --set-ctrl=backlight_compensation=1 # provide video stream ( while true; do - # gst-launch-1.0 -e rtpbin name=b rtp-profile=avpf uvch264src device=/dev/video0 name=src auto-start=true src.vidsrc ! video/x-raw,framerate=30/1,profile=high ! videoscale ! video/x-raw,width=1920,height=1080 ! videoconvert ! x264enc tune=zerolatency bitrate=7000 speed-preset=superfast key-int-max=15 ! rtph264pay ! rtpulpfecenc percentage=50 percentage-important=75 ! rtprtxqueue max-size-packets=1000 ! b.send_rtp_sink_0 b.send_rtp_src_0 ! udpsink host=terminal1 port=5001 udpsrc address=:: port=5002 ! b.recv_rtcp_sink_0 b.send_rtcp_src_0 ! udpsink host=terminal1 port=5003 sync=false async=false - - gst-launch-1.0 -e rtpbin name=b rtp-profile=avpf uvch264src device=/dev/video0 name=src auto-start=true src.vidsrc ! video/x-raw,framerate=30/1,profile=high ! videoscale ! video/x-raw,width=1920,height=1080 ! videoconvert ! x264enc tune=zerolatency bitrate=5000 speed-preset=superfast psy-tune=film key-int-max=15 ! rtph264pay ! rtpulpfecenc percentage=50 percentage-important=75 ! rtprtxqueue max-size-packets=5000 ! b.send_rtp_sink_0 b.send_rtp_src_0 ! udpsink host=fd63:bb49:f2eb:1337::a1 port=5001 udpsrc address=:: port=5002 ! b.recv_rtcp_sink_0 b.send_rtcp_src_0 ! udpsink host=fd63:bb49:f2eb:1337::a1 port=5003 sync=false async=false + gst-launch-1.0 -e rtpbin name=b rtp-profile=avpf uvch264src device=/dev/video0 name=src auto-start=true \ + src.vidsrc ! video/x-raw,framerate=30/1,profile=high ! videoscale ! video/x-raw,width=1920,height=1080 ! videoconvert ! x264enc tune=zerolatency bitrate=5000 speed-preset=superfast psy-tune=film key-int-max=15 ! rtph264pay ! rtpulpfecenc percentage=50 percentage-important=75 ! rtprtxqueue max-size-packets=5000 ! b.send_rtp_sink_0 \ + b.send_rtp_src_0 ! udpsink host=terminal1 port=5001 \ + udpsrc address=:: port=5002 ! b.recv_rtcp_sink_0 \ + b.send_rtcp_src_0 ! udpsink host=terminal1 port=5003 sync=false async=false sleep 1 done ) & From 1f97d1688b9dcffea46bb10ad4ff1930079a9043 Mon Sep 17 00:00:00 2001 From: livecam Date: Fri, 14 Aug 2020 20:11:34 +0200 Subject: [PATCH 2/6] Cleanup --- terminal1/start.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/terminal1/start.sh b/terminal1/start.sh index 2f5d774..ed2ecd3 100755 --- a/terminal1/start.sh +++ b/terminal1/start.sh @@ -17,7 +17,8 @@ export DISPLAY=:0 ( while true; do gst-launch-1.0 -e rtpbin name=b rtp-profile=avpf do-retransmission=true \ - udpsrc address=:: port=5001 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! b.recv_rtp_sink_0 b. ! rtpulpfecdec ! rtph264depay ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=1024,height=786 ! glimagesink \ + udpsrc address=:: port=5001 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! b.recv_rtp_sink_0 \ + b. ! rtpulpfecdec ! rtph264depay ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=1024,height=786 ! glimagesink \ udpsrc address=:: port=5003 ! b.recv_rtcp_sink_0 \ b.send_rtcp_src_0 ! udpsink host=cam1 port=5002 sync=false async=false & GSTPID=$! @@ -62,7 +63,8 @@ PIDS="$PIDS $!" ( while true; do gst-launch-1.0 -e rtpbin name=b rtp-profile=avpf do-retransmission=true \ - udpsrc address=:: port=5004 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! b.recv_rtp_sink_0 b. ! rtpulpfecdec ! rtph264depay ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=1024,height=786 ! xvimagesink \ + udpsrc address=:: port=5004 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! b.recv_rtp_sink_0 \ + b. ! rtpulpfecdec ! rtph264depay ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=1024,height=786 ! xvimagesink \ udpsrc address=:: port=5006 ! b.recv_rtcp_sink_0 \ b.send_rtcp_src_0 ! udpsink host=cam2 port=5005 sync=false async=false & GSTPID=$! From 3772444081f9302419100fff500daf85fa4e1945 Mon Sep 17 00:00:00 2001 From: livecam Date: Sat, 15 Aug 2020 17:31:02 +0200 Subject: [PATCH 3/6] service --- systemd/livecam-chch.service | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 systemd/livecam-chch.service diff --git a/systemd/livecam-chch.service b/systemd/livecam-chch.service new file mode 100644 index 0000000..c4c9958 --- /dev/null +++ b/systemd/livecam-chch.service @@ -0,0 +1,9 @@ +[Unit] +Description=Barrierefreie Livecam des chch-service. + +[Service] +Type=simple +ExecStart=/opt/livecam/start.sh + +[Install] +WantedBy=multi-user.target From a155ae2210e33d76816f60fc7c15c42cb202ed6f Mon Sep 17 00:00:00 2001 From: livecam Date: Sat, 15 Aug 2020 19:21:01 +0200 Subject: [PATCH 4/6] installscritp --- systemd/installservice.sh | 8 ++++++++ systemd/livecam-chch.service | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 systemd/installservice.sh diff --git a/systemd/installservice.sh b/systemd/installservice.sh new file mode 100755 index 0000000..578e9a6 --- /dev/null +++ b/systemd/installservice.sh @@ -0,0 +1,8 @@ +!/bin/bash + +sudo cp /home/livecam/LiveCam/systemd/livecam-chch.service /etc/systemd/system/livecam-chch.service +chmod 664 /etc/systemd/system/livecam-chch.service +# service enablen - startet so automatisch +systemctl enable livecam-chch + + diff --git a/systemd/livecam-chch.service b/systemd/livecam-chch.service index c4c9958..ac38ae2 100644 --- a/systemd/livecam-chch.service +++ b/systemd/livecam-chch.service @@ -3,7 +3,7 @@ Description=Barrierefreie Livecam des chch-service. [Service] Type=simple -ExecStart=/opt/livecam/start.sh +ExecStart=su livecam /home/livecam/LiveCam/cam1/start.sh [Install] WantedBy=multi-user.target From 8bf53b18238f007974e9b38695df6fa53b765d26 Mon Sep 17 00:00:00 2001 From: livecam Date: Sat, 15 Aug 2020 19:21:41 +0200 Subject: [PATCH 5/6] installscritp --- systemd/installservice.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemd/installservice.sh b/systemd/installservice.sh index 578e9a6..4e5e28e 100755 --- a/systemd/installservice.sh +++ b/systemd/installservice.sh @@ -1,8 +1,8 @@ !/bin/bash sudo cp /home/livecam/LiveCam/systemd/livecam-chch.service /etc/systemd/system/livecam-chch.service -chmod 664 /etc/systemd/system/livecam-chch.service +sudo chmod 664 /etc/systemd/system/livecam-chch.service # service enablen - startet so automatisch -systemctl enable livecam-chch +sudo systemctl enable livecam-chch From 4f7a9ab81b45b2e294c219f05bd33af3cda19122 Mon Sep 17 00:00:00 2001 From: livecam Date: Sat, 15 Aug 2020 19:31:20 +0200 Subject: [PATCH 6/6] skripte --- systemd/installservice.sh | 2 +- systemd/livecam-chch.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/systemd/installservice.sh b/systemd/installservice.sh index 4e5e28e..d75d2f4 100755 --- a/systemd/installservice.sh +++ b/systemd/installservice.sh @@ -1,4 +1,4 @@ -!/bin/bash +#!/bin/bash sudo cp /home/livecam/LiveCam/systemd/livecam-chch.service /etc/systemd/system/livecam-chch.service sudo chmod 664 /etc/systemd/system/livecam-chch.service diff --git a/systemd/livecam-chch.service b/systemd/livecam-chch.service index ac38ae2..0deab9b 100644 --- a/systemd/livecam-chch.service +++ b/systemd/livecam-chch.service @@ -3,7 +3,7 @@ Description=Barrierefreie Livecam des chch-service. [Service] Type=simple -ExecStart=su livecam /home/livecam/LiveCam/cam1/start.sh +ExecStart=su livecam /home/livecam/LiveCam/cam1/start.sh & [Install] WantedBy=multi-user.target