generated from pavel.muhortov/template-bash
simple code refactoring
This commit is contained in:
parent
f70139ed17
commit
7e13ec5c7d
|
@ -2,6 +2,15 @@
|
||||||
|
|
||||||
PTZ IP-Camera management
|
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)
|
![cctv-scheduler](info/images/cctv-scheduler-0.1.png)
|
||||||
|
|
||||||
## `Installation`
|
## `Installation`
|
||||||
|
@ -50,15 +59,6 @@ Look at examples and edit scheduler tasks:
|
||||||
crontab -e
|
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
|
## `sequences`.sh
|
||||||
|
|
||||||
**Description:**
|
**Description:**
|
||||||
|
@ -132,7 +132,7 @@ ____
|
||||||
| POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
|
| POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
|
||||||
|-----------|--------------|------------------------|---------------|
|
|-----------|--------------|------------------------|---------------|
|
||||||
| 1 | **[qn]** |execution without pauses||
|
| 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||
|
| 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:
|
Example usage in terminal with bash for today's MP4 making:
|
||||||
|
@ -176,9 +176,9 @@ ____
|
||||||
| POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
|
| POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
|
||||||
|-----------|--------------|------------------------|---------------|
|
|-----------|--------------|------------------------|---------------|
|
||||||
| 1 | **[qn]** |execution without pauses||
|
| 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||
|
| 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||
|
| 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:
|
Example usage in terminal with bash for publish to Telegram today's MP4:
|
||||||
|
@ -218,7 +218,7 @@ ____
|
||||||
|**[--dst]**|destination url|`None`|
|
|**[--dst]**|destination url|`None`|
|
||||||
|**[--ffpath]**|alternative path to bin|`None`|
|
|**[--ffpath]**|alternative path to bin|`None`|
|
||||||
|**[--watchdog]**|detect ffmpeg freeze and terminate||
|
|**[--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||
|
|**[--mono]**|detect ffmpeg running copy and terminate||
|
||||||
|
|
||||||
Example usage in terminal with make the script executable:
|
Example usage in terminal with make the script executable:
|
||||||
|
|
|
@ -259,7 +259,7 @@ setcammov() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
## VARIABLES:
|
# VARIABLES:
|
||||||
#
|
#
|
||||||
|
|
||||||
show=$1
|
show=$1
|
||||||
|
@ -316,27 +316,27 @@ sleep 4m
|
||||||
setcammov 0 -44 33 1.50s '08 >> 09 Точка - Стадион 8x'
|
setcammov 0 -44 33 1.50s '08 >> 09 Точка - Стадион 8x'
|
||||||
setcampos 2860 -170 80 5.00s '08 >| 09 Точка - Стадион 8x'
|
setcampos 2860 -170 80 5.00s '08 >| 09 Точка - Стадион 8x'
|
||||||
sleep 1m
|
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'
|
setcampos 2805 200 80 5.00s '09 >| 10 Точка - Въезд во двор 8x'
|
||||||
sleep 5m
|
sleep 5m
|
||||||
setcammov -88 99 0 5.00s '10 >> 11 Точка - Бассейн 8x'
|
setcammov -88 99 0 5.00s '10 >> 11 Точка - Бассейн 8x'
|
||||||
setcammov -99 88 0 2.00s '10 >> 11 Точка - Бассейн 8x'
|
setcammov -99 88 0 2.00s '10 >> 11 Точка - Бассейн 8x'
|
||||||
setcammov -44 99 0 4.25s '10 >> 11 Точка - Бассейн 8x'
|
setcammov -44 99 0 4.75s '10 >> 11 Точка - Бассейн 8x'
|
||||||
setcampos 2510 -20 80 5.00s '10 >| 11 Точка - Бассейн 8x'
|
setcampos 2510 -100 80 5.00s '10 >| 11 Точка - Бассейн 8x'
|
||||||
sleep 1m
|
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'
|
setcampos 2415 -200 160 5.00s '11 >| 12 Точка - Общежитие дальнее 16x'
|
||||||
sleep 1m
|
sleep 1m
|
||||||
setcammov 66 0 0 22.5s '12 >> 13 Точка - Общежите ближнее 16x'
|
setcammov 66 0 0 22.5s '12 >> 13 Точка - Общежите ближнее 16x'
|
||||||
setcampos 2640 -200 160 5.00s '12 >| 13 Точка - Общежите ближнее 16x'
|
setcampos 2640 -200 160 5.00s '12 >| 13 Точка - Общежите ближнее 16x'
|
||||||
sleep 1m
|
sleep 1m
|
||||||
setcammov 66 0 0 90.5s '13 >> 14 Точка - Крыша магазина 4x'
|
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'
|
setcampos 335 -200 40 5.00s '13 >| 14 Точка - Крыша магазина 4x'
|
||||||
sleep 1m
|
sleep 1m
|
||||||
setcamtxt '' && getcamimg 'point-11' && setcamtxt "$(getairtmp)'C"
|
setcamtxt '' && getcamimg 'point-11' && setcamtxt "$(getairtmp)'C"
|
||||||
sleep 4m
|
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'
|
setcampos 0 -200 10 5.00s '14 >| 15 Точка - Панорама верх 1x'
|
||||||
sleep 1m
|
sleep 1m
|
||||||
setcamtxt '' && getcamimg 'point-12' && setcamtxt "$(getairtmp)'C"
|
setcamtxt '' && getcamimg 'point-12' && setcamtxt "$(getairtmp)'C"
|
||||||
|
|
|
@ -89,7 +89,7 @@ getconfig() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
## VARIABLES:
|
# VARIABLES:
|
||||||
#
|
#
|
||||||
|
|
||||||
show=$1
|
show=$1
|
||||||
|
|
|
@ -330,7 +330,7 @@ setconfig() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
## VARIABLES:
|
# VARIABLES:
|
||||||
#
|
#
|
||||||
|
|
||||||
show=$1
|
show=$1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user