.agents/
.cargo/
.codex/
.config/
.gnupg/
.local/
.vim/
bin/
ag
189 B
book-counter
112 B
cargo-flow
321 B
cargo-flow-check
422 B
colors
210 B
conky-sync-status
554 B
git-delete-merged
92 B
git-forest
13.1 KiB
haskell-tags
230 B
haskell-watch-build
125 B
haskell-watch-lint
151 B
kitty-reload
35 B
kitty-switch-theme
283 B
lock
288 B
mount-tank
78 B
pinentry
46 B
pkgbuild-dl
87 B
record-window
996 B
refresh-display
38 B
screenshot
127 B
screenshot-region
176 B
seedbox-mount
621 B
seedbox-status
129 B
set-background
90 B
share-sync
577 B
spectrwm-status
22 B
start-streaming
904 B
sync-up
661 B
todo
60 B
todo-widget
235 B
toggle-displays
1.5 KiB
tty-record
200 B
twitch
68 B
waybar-audio-output-selector
2.0 KiB
waybar-clipboard
847 B
waybar-screenshot
554 B
xmobar-brightness
191 B
xmobar-dropbox-status
152 B
xmobar-sync-status
304 B
etc/
images/
.dircolors
4.2 KiB
.fzy.zsh
1.1 KiB
.ghci
501 B
.gitconfig
2.2 KiB
.gitignore
0 B
.gitsigners
282 B
.ignore
136 B
.rgrc
174 B
.vimrc
12.7 KiB
.vimrc.lua
113 B
.wacom
260 B
bin/start-streaming
raw
| 1 | #!/bin/sh |
| 2 | INRES="3840x2160" |
| 3 | OUTRES="1920x1080" |
| 4 | FPS="12" # target FPS |
| 5 | GOP="24" # i-frame interval, should be double of FPS, |
| 6 | GOPMIN="12" # min i-frame interval, should be equal to fps, |
| 7 | THREADS="4" # max 6 |
| 8 | CBR="2500k" # constant bitrate (should be between 1000k - 3000k) |
| 9 | QUALITY="fast" # one of the many FFMPEG preset |
| 10 | AUDIO_RATE="44100" |
| 11 | # to hide logs use= -loglevel quiet |
| 12 | |
| 13 | ffmpeg -f x11grab \ |
| 14 | -s "$INRES" \ |
| 15 | -r "$FPS" \ |
| 16 | -thread_queue_size 1024 \ |
| 17 | -i :0.0 \ |
| 18 | -f alsa \ |
| 19 | -acodec pcm_s32le \ |
| 20 | -i hw:0,0 \ |
| 21 | -f flv \ |
| 22 | -ac 2 \ |
| 23 | -ar $AUDIO_RATE \ |
| 24 | -sws_flags lanczos \ |
| 25 | -vcodec libx264 \ |
| 26 | -x264opts keyint=$GOP:scenecut=-1 \ |
| 27 | -b:v $CBR \ |
| 28 | -minrate $CBR \ |
| 29 | -maxrate $CBR \ |
| 30 | -pix_fmt yuv420p \ |
| 31 | -s $OUTRES \ |
| 32 | -acodec aac \ |
| 33 | -tune zerolatency \ |
| 34 | -preset $QUALITY \ |
| 35 | -threads $THREADS \ |
| 36 | -bufsize $CBR "rtmp://live.twitch.tv/app/$STREAM_KEY" |
| 37 |