From 941797fc19e66eb9ddce2352d56ae408a8fa4400 Mon Sep 17 00:00:00 2001 From: Sebasitan Nohn Date: Sat, 29 Feb 2020 09:15:52 +0000 Subject: [PATCH 1/8] allow changing camera orientation --- displaycameras | 5 +++-- example_layouts/layout.conf.1024x600 | 7 ++++++ example_layouts/layout.conf.1280x1028 | 10 +++++++++ example_layouts/layout.conf.1280x720 | 10 +++++++++ example_layouts/layout.conf.1280x768 | 10 +++++++++ example_layouts/layout.conf.1280x800 | 9 ++++++++ example_layouts/layout.conf.1440x900 | 10 +++++++++ example_layouts/layout.conf.1440x900.3x3 | 21 ++++++++++++++++++ example_layouts/layout.conf.1920x1080.10on3x3 | 13 +++++++++++ .../layout.conf.1920x1080.14mid-res-on-2x2 | 19 ++++++++++++++++ example_layouts/layout.conf.1920x1080.1x1 | 8 +++++++ example_layouts/layout.conf.1920x1080.3x3 | 22 +++++++++++++++++++ example_layouts/layout.conf.1920x1080.4on1x1 | 9 ++++++++ example_layouts/layout.conf.1920x1200.6on2x2 | 11 ++++++++++ example_layouts/layout.conf.640x480 | 7 ++++++ ..._with_2x2lowerleft_child_matrix_on1280x800 | 12 ++++++++++ example_layouts/layout.conf.large_left | 11 ++++++++++ example_layouts/layout.examples | 11 ++++++++++ layout.conf.default | 10 +++++++++ 19 files changed, 213 insertions(+), 2 deletions(-) mode change 100644 => 100755 displaycameras diff --git a/displaycameras b/displaycameras old mode 100644 new mode 100755 index c8edf5b..7c0e65e --- a/displaycameras +++ b/displaycameras @@ -118,8 +118,9 @@ do x=$((i+$DISPLAY_SEQUENCE)) if [ "$x" -ge "${#camera_names[@]}" ]; then x=$((x-${#camera_names[@]})) fi - player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" + player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" + echo $player eval $player sleep $startsleep while [ "`omxplayer_dbuscontrol ${camera_names[$i]} getplaystatus`" != "Playing" ] @@ -220,7 +221,7 @@ do x=$((i+$DISPLAY_SEQUENCE)) if [ "$x" -ge "${#camera_names[@]}" ]; then x=$((x-${#camera_names[@]})) fi - player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" + player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" eval $player sleep $startsleep diff --git a/example_layouts/layout.conf.1024x600 b/example_layouts/layout.conf.1024x600 index ab6cdaf..47c0c02 100644 --- a/example_layouts/layout.conf.1024x600 +++ b/example_layouts/layout.conf.1024x600 @@ -38,6 +38,13 @@ camera_feeds=( "rtsp://xxx.xxx.xxx.xxx/yyyyy_1" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +) + + # Are we rotating cameras through the window matrix? Set this explicitly to # "false" if not desired in this display layout. rotate="true" diff --git a/example_layouts/layout.conf.1280x1028 b/example_layouts/layout.conf.1280x1028 index 59619a8..f7c8ae5 100644 --- a/example_layouts/layout.conf.1280x1028 +++ b/example_layouts/layout.conf.1280x1028 @@ -68,6 +68,16 @@ camera_feeds=( "" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + # Are we rotating cameras through the window matrix? Set this explicitly to # "false" if not desired in this display layout. rotate="false" diff --git a/example_layouts/layout.conf.1280x720 b/example_layouts/layout.conf.1280x720 index 3abc7e9..2d6a788 100644 --- a/example_layouts/layout.conf.1280x720 +++ b/example_layouts/layout.conf.1280x720 @@ -62,6 +62,16 @@ camera_feeds=( "" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + # Are we rotating cameras through the window matrix? Set this explicitly to # "false" if not desired in this display layout. rotate="true" diff --git a/example_layouts/layout.conf.1280x768 b/example_layouts/layout.conf.1280x768 index 8365662..889ed3e 100644 --- a/example_layouts/layout.conf.1280x768 +++ b/example_layouts/layout.conf.1280x768 @@ -62,6 +62,16 @@ camera_feeds=( "" \ ) +camera_orientations=( \ +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + # Are we rotating cameras through the window matrix? Set this explicitly to # "false" if not desired in this display layout. rotate="true" diff --git a/example_layouts/layout.conf.1280x800 b/example_layouts/layout.conf.1280x800 index 7339663..dc36eb8 100644 --- a/example_layouts/layout.conf.1280x800 +++ b/example_layouts/layout.conf.1280x800 @@ -52,5 +52,14 @@ camera_feeds=( \ "rtsp://example.com:7447/xxxxyyyyyyzzzz" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +) + + # Are we rotating cameras through the window matrix? (default false if not set h ere) # rotate="true" diff --git a/example_layouts/layout.conf.1440x900 b/example_layouts/layout.conf.1440x900 index 64dbb09..21d7cd5 100644 --- a/example_layouts/layout.conf.1440x900 +++ b/example_layouts/layout.conf.1440x900 @@ -60,6 +60,16 @@ camera_feeds=( "" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + # Are we rotating cameras through the window matrix? Set this explicitly to # "false" if not desired in this display layout. rotate="true" diff --git a/example_layouts/layout.conf.1440x900.3x3 b/example_layouts/layout.conf.1440x900.3x3 index 64a77dc..62442dc 100644 --- a/example_layouts/layout.conf.1440x900.3x3 +++ b/example_layouts/layout.conf.1440x900.3x3 @@ -91,5 +91,26 @@ camera_feeds=( \ "" \ ) +camera_orientations=( \ +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + + # Are we rotating cameras through the window matrix? (default false if not set here) rotate="true" diff --git a/example_layouts/layout.conf.1920x1080.10on3x3 b/example_layouts/layout.conf.1920x1080.10on3x3 index 3c9a54b..18a131e 100644 --- a/example_layouts/layout.conf.1920x1080.10on3x3 +++ b/example_layouts/layout.conf.1920x1080.10on3x3 @@ -74,5 +74,18 @@ camera_feeds=( \ "" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + # Are we rotating cameras through the window matrix? (default false if not set here) rotate="true" diff --git a/example_layouts/layout.conf.1920x1080.14mid-res-on-2x2 b/example_layouts/layout.conf.1920x1080.14mid-res-on-2x2 index 88c2ad9..51007b7 100644 --- a/example_layouts/layout.conf.1920x1080.14mid-res-on-2x2 +++ b/example_layouts/layout.conf.1920x1080.14mid-res-on-2x2 @@ -85,6 +85,25 @@ camera_feeds=( \ "" \ ) +camera_orientations=( \ +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + + # Are we rotating cameras through the window matrix? (default false if not set here) rotate="true" # Set a quick rotation cycle since we have 10 displays to rotate from off screen (about 1 minute) diff --git a/example_layouts/layout.conf.1920x1080.1x1 b/example_layouts/layout.conf.1920x1080.1x1 index b1ef6e6..219d1e0 100644 --- a/example_layouts/layout.conf.1920x1080.1x1 +++ b/example_layouts/layout.conf.1920x1080.1x1 @@ -53,5 +53,13 @@ camera_feeds=( \ "" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +) + # Are we rotating cameras through the window matrix? (default false if not set here) rotate="true" diff --git a/example_layouts/layout.conf.1920x1080.3x3 b/example_layouts/layout.conf.1920x1080.3x3 index 148b59e..8c8b23f 100644 --- a/example_layouts/layout.conf.1920x1080.3x3 +++ b/example_layouts/layout.conf.1920x1080.3x3 @@ -94,5 +94,27 @@ camera_feeds=( \ "" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + + # Are we rotating cameras through the window matrix? (default false if not set here) rotate="true" diff --git a/example_layouts/layout.conf.1920x1080.4on1x1 b/example_layouts/layout.conf.1920x1080.4on1x1 index 003d19e..61bdf8f 100644 --- a/example_layouts/layout.conf.1920x1080.4on1x1 +++ b/example_layouts/layout.conf.1920x1080.4on1x1 @@ -38,6 +38,15 @@ camera_feeds=( \ "rtsp://xxx.xxx.xxx.xxx:7447/yyyyyyyyy_0" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +) + + # Are we rotating cameras through the window matrix? (default false if not set here) rotate="true" rotatedelay=8 diff --git a/example_layouts/layout.conf.1920x1200.6on2x2 b/example_layouts/layout.conf.1920x1200.6on2x2 index 7af0f19..7ede0dd 100644 --- a/example_layouts/layout.conf.1920x1200.6on2x2 +++ b/example_layouts/layout.conf.1920x1200.6on2x2 @@ -63,5 +63,16 @@ camera_feeds=( \ "" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + + # Are we rotating cameras through the window matrix? (default false if not set here) rotate="true" diff --git a/example_layouts/layout.conf.640x480 b/example_layouts/layout.conf.640x480 index ab25cc3..75985a0 100644 --- a/example_layouts/layout.conf.640x480 +++ b/example_layouts/layout.conf.640x480 @@ -39,5 +39,12 @@ camera_feeds=( \ "rtsp://xxx.xxx.xxx.xxx/yyyyy_1" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +) + # Are we rotating cameras through the window matrix? (default false if not set h ere) rotate="true" diff --git a/example_layouts/layout.conf.7on2x2_with_2x2lowerleft_child_matrix_on1280x800 b/example_layouts/layout.conf.7on2x2_with_2x2lowerleft_child_matrix_on1280x800 index bdb1952..5bd8b66 100644 --- a/example_layouts/layout.conf.7on2x2_with_2x2lowerleft_child_matrix_on1280x800 +++ b/example_layouts/layout.conf.7on2x2_with_2x2lowerleft_child_matrix_on1280x800 @@ -60,5 +60,17 @@ camera_feeds=( \ "" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + # Are we rotating cameras through the window matrix? (default false if not set here) rotate="false" diff --git a/example_layouts/layout.conf.large_left b/example_layouts/layout.conf.large_left index c6bc232..3456e51 100644 --- a/example_layouts/layout.conf.large_left +++ b/example_layouts/layout.conf.large_left @@ -80,6 +80,17 @@ camera_feeds=( \ "" \ ) +camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + + # Are we rotating cameras through the window matrix? (default false if not set here) # You're REALLY not going to want to rotate these as the RPi will have to do # significant downscaling on the Hi-Res feed to display it in the smaller windows. diff --git a/example_layouts/layout.examples b/example_layouts/layout.examples index 9d8e090..e999fa7 100644 --- a/example_layouts/layout.examples +++ b/example_layouts/layout.examples @@ -193,5 +193,16 @@ #"" \ #) +#camera_orientations=( +# Camera display orientation. Possible values are 0, 90, 180 and 270 +#"0" \ +#"0" \ +#"0" \ +#"0" \ +#"0" \ +#"0" \ +#) + + # Are we rotating? # rotation="true" diff --git a/layout.conf.default b/layout.conf.default index 214b81f..9bed775 100644 --- a/layout.conf.default +++ b/layout.conf.default @@ -68,6 +68,16 @@ camera_feeds=( \ "" \ ) +camera_orientations=( \ +# Camera display orientation. Possible values are 0, 90, 180 and 270 +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +"0" \ +) + # Are we rotating cameras through the window matrix? (default false if not set here) # rotate="true" From 8a01d1be5117ffa47557e62aa12fd73a01d3864e Mon Sep 17 00:00:00 2001 From: Sebasitan Nohn Date: Sat, 29 Feb 2020 11:28:51 +0000 Subject: [PATCH 2/8] remove debugging output --- displaycameras | 1 - install.sh | 0 2 files changed, 1 deletion(-) mode change 100644 => 100755 install.sh diff --git a/displaycameras b/displaycameras index 7c0e65e..49ef18d 100755 --- a/displaycameras +++ b/displaycameras @@ -120,7 +120,6 @@ do fi player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" - echo $player eval $player sleep $startsleep while [ "`omxplayer_dbuscontrol ${camera_names[$i]} getplaystatus`" != "Playing" ] diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 From f70538fb42c8754a464a25a9b76fd4b128413f57 Mon Sep 17 00:00:00 2001 From: Sebasitan Nohn Date: Sat, 14 Mar 2020 11:37:32 +0000 Subject: [PATCH 3/8] add camera crops functionality --- displaycameras | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/displaycameras b/displaycameras index 49ef18d..282076d 100755 --- a/displaycameras +++ b/displaycameras @@ -118,7 +118,12 @@ do x=$((i+$DISPLAY_SEQUENCE)) if [ "$x" -ge "${#camera_names[@]}" ]; then x=$((x-${#camera_names[@]})) fi - player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" + if [ "${camera_crops[$i]}" != "false" ]; then + camera_crop="--crop \"${camera_crops[$i]}\"" + else + camera_crop="" + fi + player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp $camera_crop --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" eval $player sleep $startsleep @@ -220,6 +225,11 @@ do x=$((i+$DISPLAY_SEQUENCE)) if [ "$x" -ge "${#camera_names[@]}" ]; then x=$((x-${#camera_names[@]})) fi + if [ "${camera_crops[$i]}" != "false" ]; then + camera_crop="--crop \"${camera_crops[$i]}\"" + else + camera_crop="" + fi player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" eval $player From a7ee569b0edde1186e0cb08231c0ac8683ff03e7 Mon Sep 17 00:00:00 2001 From: Sebasitan Nohn Date: Sat, 14 Mar 2020 12:07:27 +0000 Subject: [PATCH 4/8] check if variable is set, otherwise ignore --- displaycameras | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/displaycameras b/displaycameras index 282076d..a62f9dc 100755 --- a/displaycameras +++ b/displaycameras @@ -118,12 +118,17 @@ do x=$((i+$DISPLAY_SEQUENCE)) if [ "$x" -ge "${#camera_names[@]}" ]; then x=$((x-${#camera_names[@]})) fi - if [ "${camera_crops[$i]}" != "false" ]; then - camera_crop="--crop \"${camera_crops[$i]}\"" - else - camera_crop="" + if [ ${#camera_crops[@]} -ne 0 ] && [ -n "${camera_crops[$i]}" ] && [ "${camera_crops[$i]}" != "false" ]; then + camera_crop="--crop \"${camera_crops[$i]}\"" + else + camera_crop="" fi - player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp $camera_crop --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" + if [ ${#camera_orientations[@]} -ne 0 ] && [ -n "${camera_orientations[$i]}" ] && [ "${camera_orientations[$i]}" != "0" ]; then + camera_orientation="--orientation \"${camera_orientations[$i]}\"" + else + camera_orientation="" + fi + player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp $camera_crop $camera_orientation --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" eval $player sleep $startsleep @@ -225,11 +230,16 @@ do x=$((i+$DISPLAY_SEQUENCE)) if [ "$x" -ge "${#camera_names[@]}" ]; then x=$((x-${#camera_names[@]})) fi - if [ "${camera_crops[$i]}" != "false" ]; then - camera_crop="--crop \"${camera_crops[$i]}\"" - else - camera_crop="" - fi + if [ ${#camera_crops[@]} -ne 0 ] && [ -n "${camera_crops[$i]}" ] && [ "${camera_crops[$i]}" != "false" ]; then + camera_crop="--crop \"${camera_crops[$i]}\"" + else + camera_crop="" + fi + if [ ${#camera_orientations[@]} -ne 0 ] && [ -n "${camera_orientations[$i]}" ] && [ "${camera_orientations[$i]}" != "0" ]; then + camera_orientation="--orientation \"${camera_orientations[$i]}\"" + else + camera_orientation="" + fi player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" eval $player From 3692d162935f4c1130eac50356bba7a0a424cde3 Mon Sep 17 00:00:00 2001 From: bal0u45 <47568953+bal0u45@users.noreply.github.com> Date: Tue, 17 Mar 2020 13:35:01 +0100 Subject: [PATCH 5/8] Change formatting --- displaycameras | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/displaycameras b/displaycameras index a62f9dc..19ede52 100755 --- a/displaycameras +++ b/displaycameras @@ -120,14 +120,14 @@ do fi if [ ${#camera_crops[@]} -ne 0 ] && [ -n "${camera_crops[$i]}" ] && [ "${camera_crops[$i]}" != "false" ]; then camera_crop="--crop \"${camera_crops[$i]}\"" - else + else camera_crop="" - fi - if [ ${#camera_orientations[@]} -ne 0 ] && [ -n "${camera_orientations[$i]}" ] && [ "${camera_orientations[$i]}" != "0" ]; then - camera_orientation="--orientation \"${camera_orientations[$i]}\"" - else - camera_orientation="" - fi + fi + if [ ${#camera_orientations[@]} -ne 0 ] && [ -n "${camera_orientations[$i]}" ] && [ "${camera_orientations[$i]}" != "0" ]; then + camera_orientation="--orientation \"${camera_orientations[$i]}\"" + else + camera_orientation="" + fi player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp $camera_crop $camera_orientation --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" eval $player @@ -236,9 +236,9 @@ do camera_crop="" fi if [ ${#camera_orientations[@]} -ne 0 ] && [ -n "${camera_orientations[$i]}" ] && [ "${camera_orientations[$i]}" != "0" ]; then - camera_orientation="--orientation \"${camera_orientations[$i]}\"" + camera_orientation="--orientation \"${camera_orientations[$i]}\"" else - camera_orientation="" + camera_orientation="" fi player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" From 1018c2fd088cb955466e7e4ba615e1915fb18dae Mon Sep 17 00:00:00 2001 From: bal0u45 <47568953+bal0u45@users.noreply.github.com> Date: Tue, 17 Mar 2020 13:39:05 +0100 Subject: [PATCH 6/8] Fix missing variable Adding missing $camera_crop variable to the repair part and changing the $camera_orientation variable to work like in the startup part --- displaycameras | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/displaycameras b/displaycameras index 19ede52..44609a2 100755 --- a/displaycameras +++ b/displaycameras @@ -240,7 +240,7 @@ do else camera_orientation="" fi - player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" + player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp $camera_crop $camera_orientation --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" eval $player sleep $startsleep From 16da0605cc328d806ee24cb7ca130e790a238177 Mon Sep 17 00:00:00 2001 From: bal0u45 <47568953+bal0u45@users.noreply.github.com> Date: Wed, 18 Mar 2020 12:37:18 +0100 Subject: [PATCH 7/8] Revert "Change formatting" This reverts commit 3692d162935f4c1130eac50356bba7a0a424cde3. --- displaycameras | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/displaycameras b/displaycameras index 44609a2..8cfd906 100755 --- a/displaycameras +++ b/displaycameras @@ -120,14 +120,14 @@ do fi if [ ${#camera_crops[@]} -ne 0 ] && [ -n "${camera_crops[$i]}" ] && [ "${camera_crops[$i]}" != "false" ]; then camera_crop="--crop \"${camera_crops[$i]}\"" - else + else camera_crop="" - fi - if [ ${#camera_orientations[@]} -ne 0 ] && [ -n "${camera_orientations[$i]}" ] && [ "${camera_orientations[$i]}" != "0" ]; then - camera_orientation="--orientation \"${camera_orientations[$i]}\"" - else - camera_orientation="" - fi + fi + if [ ${#camera_orientations[@]} -ne 0 ] && [ -n "${camera_orientations[$i]}" ] && [ "${camera_orientations[$i]}" != "0" ]; then + camera_orientation="--orientation \"${camera_orientations[$i]}\"" + else + camera_orientation="" + fi player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp $camera_crop $camera_orientation --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" eval $player @@ -236,9 +236,9 @@ do camera_crop="" fi if [ ${#camera_orientations[@]} -ne 0 ] && [ -n "${camera_orientations[$i]}" ] && [ "${camera_orientations[$i]}" != "0" ]; then - camera_orientation="--orientation \"${camera_orientations[$i]}\"" + camera_orientation="--orientation \"${camera_orientations[$i]}\"" else - camera_orientation="" + camera_orientation="" fi player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp $camera_crop $camera_orientation --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" From e36764190ee0273d883ae15dd7bde45917d307a2 Mon Sep 17 00:00:00 2001 From: Sebastian Nohn Date: Thu, 19 Mar 2020 12:50:52 +0000 Subject: [PATCH 8/8] fix repair mode --- displaycameras | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/displaycameras b/displaycameras index a62f9dc..8cfd906 100755 --- a/displaycameras +++ b/displaycameras @@ -240,7 +240,7 @@ do else camera_orientation="" fi - player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp --orientation \"${camera_orientations[$i]}\" --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" + player="omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp $camera_crop $camera_orientation --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &" echo "Starting omxplayer for ${camera_names[$i]}" eval $player sleep $startsleep