From: Ian Kelling Date: Wed, 27 Mar 2024 19:36:29 +0000 (-0400) Subject: mostly improvements X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;ds=sidebyside;h=89a1a98bb918fdf856d34900610413c79e32897e;p=distro-setup mostly improvements --- diff --git a/distro-end b/distro-end index acc1507..16fc7a5 100755 --- a/distro-end +++ b/distro-end @@ -2009,6 +2009,18 @@ esac ### end bitcoin +### begin live streaming ### + +# comparing nginx rtmp to icecast +# `mpv --cache=no` had about 2.5 sec latency vs 4 seconds. +# Then I discovered this command which had about .5 sec latency: +#ffplay -f live_flv -fast -x 1280 -y 720 -fflags nobuffer -flags low_delay -strict experimental -vf "setpts=N/60/TB" -af "asetpts=N/60/TB" -noframedrop -i rtmp://url_here +# +pi nginx libnginx-mod-rtmp + + +### end live streaming ### + ### begin gh #### # from https://raw.githubusercontent.com/cli/cli/trunk/docs/install_linux.md diff --git a/filesystem/etc/nginx/conf.d/rtmp.conf b/filesystem/etc/nginx/conf.d/rtmp.conf new file mode 100644 index 0000000..4a47eda --- /dev/null +++ b/filesystem/etc/nginx/conf.d/rtmp.conf @@ -0,0 +1,13 @@ +# based on https://opensource.com/article/19/1/basic-live-video-streaming-server#comments +# and https://github.com/arut/nginx-rtmp-module/wiki/Directives +rtmp { + allow publish 127.0.0.1; + deny publish all; + server { + listen 1935; + application live { + live on; + record off; + } + } +} diff --git a/script-files b/script-files index b4f8b61..1a63f56 100644 --- a/script-files +++ b/script-files @@ -23,6 +23,7 @@ my_bin_files=( prof-backup prof-tail prof-notify + /a/bin/newns/newns ) for f in /b/log-quiet/*; do diff --git a/system-status b/system-status index 0e63964..dd327bb 100755 --- a/system-status +++ b/system-status @@ -389,6 +389,20 @@ write-status() { # leave it up to epanic-clean to send email notification fi + mprom=/var/lib/prometheus/node-exporter/mailtest-check.prom + if grep -qE 'mailtest_check_(unexpected|missing).*[^ ][^0]$' $mprom; then + chars+=("MTEST_SPAM") + fi + mtest_found=false + for t in $(grep -E ^mailtest_check_last_usec $mprom | awk '{print $NF}'); do + if (( t + 60 * 20 < EPOCHSECONDS )); then + mtest_found=true + fi + done + if $mtest_found; then + chars+=("MTEST_AGE") + fi + if [[ ! -e $status_file || -w $status_file ]]; then if [[ -e /a/bin/bash_unpublished/source-state ]]; then cat /a/bin/bash_unpublished/source-state >$status_file diff --git a/ziva-screen b/ziva-screen index c512673..646ae91 100755 --- a/ziva-screen +++ b/ziva-screen @@ -15,7 +15,7 @@ esac f=/run/user/1000/ziva-tmp.jpg -mkdir -p $dest_dir +install -g 1000 -o 1000 -m 700 $dest_dir cd $dest_dir shopt -s nullglob jpgs=( 20*jpg )