simple code refactoring

This commit is contained in:
pavel.muhortov 2023-03-15 15:17:48 +03:00
parent f70139ed17
commit 7e13ec5c7d
4 changed files with 22 additions and 22 deletions

View File

@ -2,6 +2,15 @@
PTZ IP-Camera management
____
- [`sequences.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#sequences-sh)
- [`converter.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#converter-sh)
- [`publisher.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#publisher-sh)
- [`streaming.py`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#streaming-py)
____
![cctv-scheduler](info/images/cctv-scheduler-0.1.png)
## `Installation`
@ -50,15 +59,6 @@ Look at examples and edit scheduler tasks:
crontab -e
```
____
- [`sequences.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#sequences-sh)
- [`converter.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#converter-sh)
- [`publisher.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#publisher-sh)
- [`streaming.py`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#streaming-py)
____
## `sequences`.sh
**Description:**
@ -132,7 +132,7 @@ ____
| POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
|-----------|--------------|------------------------|---------------|
| 1 | **[qn]** |execution without pauses||
| 2 | **[/path/to/conf]** |path to config| ./converter.conf |
| 2 | **[/path/to/conf]** |path to config|`./converter.conf`|
| 3 | **[-d\|-w\|-m\|-y]** |periods: '' - today \| '-d' - yesterday \| '-w' - last week \| '-m' - last month \| '-y' - last year||
Example usage in terminal with bash for today's MP4 making:
@ -176,9 +176,9 @@ ____
| POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
|-----------|--------------|------------------------|---------------|
| 1 | **[qn]** |execution without pauses||
| 2 | **[/path/to/conf]** |path to config| ./converter.conf |
| 2 | **[/path/to/conf]** |path to config|`./converter.conf`|
| 3 | **[-d\|-w\|-m\|-y]** |periods: '' - 0 day \| '-d' - -X day \| '-w' - -X week \| '-m' - -X month \| '-y' - -X year||
| 4 | **[1\|2\|3..XXX]** |multiplier for period: '' - 1 day\|week\|month\|year|1|
| 4 | **[1\|2\|3..XXX]** |multiplier for period: '' - 1 day\|week\|month\|year|`1`|
| 5 | **[--onlytg\|--onlywp]** |'--onlytg' - only publish to Telegram \|'--onlywp' - only publish to Wordpress||
Example usage in terminal with bash for publish to Telegram today's MP4:
@ -218,7 +218,7 @@ ____
|**[--dst]**|destination url|`None`|
|**[--ffpath]**|alternative path to bin|`None`|
|**[--watchdog]**|detect ffmpeg freeze and terminate||
|**[--sec]**|seconds to wait before the watchdog terminates|15|
|**[--sec]**|seconds to wait before the watchdog terminates|`15`|
|**[--mono]**|detect ffmpeg running copy and terminate||
Example usage in terminal with make the script executable:

View File

@ -259,7 +259,7 @@ setcammov() {
}
#
## VARIABLES:
# VARIABLES:
#
show=$1
@ -316,27 +316,27 @@ sleep 4m
setcammov 0 -44 33 1.50s '08 >> 09 Точка - Стадион 8x'
setcampos 2860 -170 80 5.00s '08 >| 09 Точка - Стадион 8x'
sleep 1m
setcammov 0 -99 0 7.50s '09 >> 10 Точка - Въезд во двор 8x'
setcammov 0 -99 0 11.5s '09 >> 10 Точка - Въезд во двор 8x'
setcampos 2805 200 80 5.00s '09 >| 10 Точка - Въезд во двор 8x'
sleep 5m
setcammov -88 99 0 5.00s '10 >> 11 Точка - Бассейн 8x'
setcammov -99 88 0 2.00s '10 >> 11 Точка - Бассейн 8x'
setcammov -44 99 0 4.25s '10 >> 11 Точка - Бассейн 8x'
setcampos 2510 -20 80 5.00s '10 >| 11 Точка - Бассейн 8x'
setcammov -44 99 0 4.75s '10 >> 11 Точка - Бассейн 8x'
setcampos 2510 -100 80 5.00s '10 >| 11 Точка - Бассейн 8x'
sleep 1m
setcammov -88 99 33 2.50s '11 >> 12 Точка - Общежитие дальнее 16x'
setcammov -88 99 33 2.85s '11 >> 12 Точка - Общежитие дальнее 16x'
setcampos 2415 -200 160 5.00s '11 >| 12 Точка - Общежитие дальнее 16x'
sleep 1m
setcammov 66 0 0 22.5s '12 >> 13 Точка - Общежите ближнее 16x'
setcampos 2640 -200 160 5.00s '12 >| 13 Точка - Общежите ближнее 16x'
sleep 1m
setcammov 66 0 0 90.5s '13 >> 14 Точка - Крыша магазина 4x'
setcammov 99 0 -44 3.25s '13 >> 14 Точка - Крыша магазина 4x'
setcammov 99 0 -44 3.35s '13 >> 14 Точка - Крыша магазина 4x'
setcampos 335 -200 40 5.00s '13 >| 14 Точка - Крыша магазина 4x'
sleep 1m
setcamtxt '' && getcamimg 'point-11' && setcamtxt "$(getairtmp)'C"
sleep 4m
setcammov -99 0 -33 2.50s '14 >> 15 Точка - Панорама верх 1x'
setcammov -99 0 -33 2.75s '14 >> 15 Точка - Панорама верх 1x'
setcampos 0 -200 10 5.00s '14 >| 15 Точка - Панорама верх 1x'
sleep 1m
setcamtxt '' && getcamimg 'point-12' && setcamtxt "$(getairtmp)'C"

View File

@ -89,7 +89,7 @@ getconfig() {
}
#
## VARIABLES:
# VARIABLES:
#
show=$1

View File

@ -330,7 +330,7 @@ setconfig() {
}
#
## VARIABLES:
# VARIABLES:
#
show=$1