diff options
author | EuAndreh <eu@euandre.org> | 2025-03-02 11:49:09 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-03-02 17:09:04 -0300 |
commit | ec94356634a891a040ee43209eeb6c2d2312da18 (patch) | |
tree | 28678f5197a5517dacdf6a0096c8d8a008b4f30a /bin | |
parent | etc/guix/home.scm: Add improved and customizes mpv and ffmpeg (diff) | |
download | dotfiles-ec94356634a891a040ee43209eeb6c2d2312da18.tar.gz dotfiles-ec94356634a891a040ee43209eeb6c2d2312da18.tar.xz |
bin/live: Add crude but working version
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/live | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/live b/bin/live new file mode 100755 index 0000000..47342ce --- /dev/null +++ b/bin/live @@ -0,0 +1,21 @@ +#!/bin/sh +set -eu + +cd "${LIVEDIR:~/Public/live}" +DIR="$(timestamp)"/"$(now)" +mkdir -p "$DIR" +cd "$DIR" + +BT="$(pacmd ls | awk '/^Default sink name: / && $0 = $4')" + +COMPATOPTS='-codec:v libx264 -profile:v baseline -level 4 -pix_fmt yuv420p -preset veryfast -codec:a aac' +QUIETOPTS='-hide_banner -loglevel warning' + +ffmpeg \ + -f x11grab -probesize 10M -i "$DISPLAY" \ + -f pulse -guess_layout_max 0 -i "$BT".monitor \ + -f pulse -guess_layout_max 0 -i default \ + -filter_complex '[1][2]amix' -ac 2 \ + $QUIETOPTS \ + $COMPATOPTS \ + -f dash live.mpd |