diff options
| author | 2024-05-22 17:24:11 +0100 | |
|---|---|---|
| committer | 2024-05-22 17:24:11 +0100 | |
| commit | d437750556449aa8f799c8cde429e0c185865700 (patch) | |
| tree | 854eadabdb68c14278fd64b96c05c48680231dc2 /home/.local/bin | |
| parent | 46e68bd9815a6a8c454bf9105b6ebe2d75f54045 (diff) | |
| download | dotfiles-d437750556449aa8f799c8cde429e0c185865700.tar.gz dotfiles-d437750556449aa8f799c8cde429e0c185865700.tar.bz2 dotfiles-d437750556449aa8f799c8cde429e0c185865700.zip  | |
Remove unused script
Diffstat (limited to 'home/.local/bin')
| -rwxr-xr-x | home/.local/bin/stream | 94 | 
1 files changed, 0 insertions, 94 deletions
diff --git a/home/.local/bin/stream b/home/.local/bin/stream deleted file mode 100755 index c427a50..0000000 --- a/home/.local/bin/stream +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env sh - -pid_file="/tmp/streampid" -log_file="/tmp/stream.log" - -pid_exists() { -    test -r "$pid_file" -} - -is_running() { -    if pid_exists; then -        ps "$(cat "$pid_file")" >/dev/null 2>&1 || return 1 -    else -        return 1 -    fi -} - -start() { -    ffmpeg \ -        -threads 0 \ -        -thread_queue_size 512 -f x11grab -s 1920x1080 -framerate 30 -i "$DISPLAY" \ -        -thread_queue_size 512 -f v4l2 -video_size 320x240 -framerate 30 -i /dev/video0 \ -        -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-stereo.monitor" \ -        -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_input.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-mono" \ -        -c:a aac \ -        -init_hw_device vaapi=va:/dev/dri/renderD128,driver=i965 -filter_hw_device va \ -        -filter_complex \ -        "[0:v]setpts=PTS-STARTPTS[bg]; \ -    [1:v]setpts=PTS-STARTPTS[fg]; \ -    [bg][fg]overlay=W-w:H-h,format=nv12,hwupload[vout]" \ -        -map "[vout]" \ -        -c:v h264_vaapi \ -        -r:v 30 -g:v 60 -bf:v 3 -refs:v 16 \ -        -filter_complex "[2:a][3:a]amerge=inputs=2[aout]" -map "[aout]" -ac 2 \ -        -f flv "rtmp://live.strisemarx.com/hls/index" >"$log_file" 2>&1 & -    echo "$!" >"$pid_file" - -    bspc config right_padding 320 -    notify-send "Stream started!" -} - -stop() { -    bspc config right_padding 0 -    pid_exists || exit 1 -    pid="$(cat "$pid_file")" -    # kill with SIGTERM, allowing finishing touches. -    kill "$pid" -    # even after SIGTERM, ffmpeg may still run, so SIGKILL it. -    sleep 3 -    is_running && kill -9 "$pid" -    rm -f "$pid_file" -    notify-send "Stream stopped!" -} - -toggle() { -    if is_running; then -        echo "Stopping stream" -        stop -    else -        echo "Starting stream" -        start -    fi -    echo -    status -} - -status() { -    if is_running; then -        echo "Streaming with PID $(cat "$pid_file")" -        echo "Check the logs at" -        echo -        echo "$log_file" -        echo -    else -        echo "Stream inactive" -    fi -} -case "$1" in -    start) -        start -        ;; -    stop) -        stop -        ;; -    toggle) -        toggle -        ;; -    status) -        status -        ;; -    *) -        toggle -        ;; -esac  | 
