Skip to content

Commit

Permalink
Add option to disable thumbnails creation
Browse files Browse the repository at this point in the history
  • Loading branch information
roleoroleo committed Sep 11, 2022
1 parent 19087ab commit 19df95d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/static/static/home/yi-hack/etc/system.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RTSP_STREAM=high
RTSP_AUDIO=yes
SPEAKER_AUDIO=yes
SNAPSHOT=yes
SNAPSHOT_VIDEO=yes
SNAPSHOT_LOW=no
ONVIF=yes
ONVIF_WSDD=yes
Expand Down
1 change: 1 addition & 0 deletions src/static/static/home/yi-hack/script/check_conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RTSP_STREAM=high
RTSP_AUDIO=yes
SPEAKER_AUDIO=yes
SNAPSHOT=yes
SNAPSHOT_VIDEO=yes
SNAPSHOT_LOW=no
ONVIF=yes
ONVIF_WSDD=yes
Expand Down
4 changes: 3 additions & 1 deletion src/static/static/home/yi-hack/script/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ mkdir -p /var/spool/cron/crontabs/
if [ ! -z "$CRONTAB" ]; then
echo -e "$CRONTAB" > /var/spool/cron/crontabs/root
fi
echo "* * * * * /home/yi-hack/script/thumb.sh cron" >> /var/spool/cron/crontabs/root
if [[ $(get_config SNAPSHOT_VIDEO) == "yes" ]] ; then
echo "* * * * * /home/yi-hack/script/thumb.sh cron" >> /var/spool/cron/crontabs/root
fi
if [ "$FREE_SPACE" != "0" ]; then
echo "0 * * * * sleep 20; /home/yi-hack/script/clean_records.sh $FREE_SPACE" >> /var/spool/cron/crontabs/root
fi
Expand Down
13 changes: 13 additions & 0 deletions src/www/httpd/htdocs/pages/configurations.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ <h4 class="no-margin">General</h4>
</span>
</td>
</tr>
<tr class="row">
<td>Snapshot for recorded video</td>
<td>
<label class="switch small">
<input type="checkbox" data-key="SNAPSHOT_VIDEO"/>
<span class="slider round"></span>
<span class="switch-text"></span>
</label>
<span class="switch-description">
Create snapshot for recorded video (CPU expensive).
</span>
</td>
</tr>
<tr class="row">
<td>Force low resolution snapshot</td>
<td>
Expand Down

0 comments on commit 19df95d

Please sign in to comment.