Skip to content

Instantly share code, notes, and snippets.

@leanfj
Created September 14, 2019 04:35
Show Gist options
  • Save leanfj/7dfdccc7b819b4952cf446cce5739b78 to your computer and use it in GitHub Desktop.
Save leanfj/7dfdccc7b819b4952cf446cce5739b78 to your computer and use it in GitHub Desktop.
Configurações pessoais do meu zshrc
screen(){
ffmpeg \
-f x11grab -s 1366x768 -r 30 -i :0.0+0,0 \
-f pulse -ac 2 -ar 44100 -i music_sink.monitor \
-f pulse -ac 1 -ar 44100 -i alsa_input.usb-JABRA_GN_2000_MS_USB-00.analog-mono \
-filter_complex amix=inputs=2 \
-vcodec libx264 -preset ultrafast -crf 18 \
-acodec libmp3lame -ar 44100 -q:a 1 \
$1.mp4
}
live() {
INRES="1366x768"
OUTRES="1280x720"
FPS="30"
GOP="60"
GOPMIN="30"
THREADS="2"
CBR="2500k"
QUALITY="ultrafast"
STREAM_KEY=""
ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0+0,0 \
-f pulse -ac 2 -ar 44100 -i music_sink.monitor \
-f pulse -ac 1 -ar 44100 -i alsa_input.usb-JABRA_GN_2000_MS_USB-00.analog-mono \
-filter_complex amix=inputs=2 \
-vcodec libx264 -g $GOP -keyint_min $GOPMIN -b:v $CBR -minrate $CBR -maxrate $CBR -pix_fmt yuv420p\
-s $OUTRES -preset $QUALITY -tune film -threads $THREADS -strict normal \
-acodec libmp3lame -ar 44100 -q:a 1 \
-bufsize $CBR -f flv "rtmp://live-rio.twitch.tv/app/$STREAM_KEY"
}
gacp(){
git add .
git commit -m "$1"
git push
}
alias atualizar="sudo apt update && sudo apt upgrade -y && sudo apt autoremove"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment