Last active
November 9, 2020 07:36
-
-
Save ecthiender/0b9626fdc8826d5b88204cfadb4f2947 to your computer and use it in GitHub Desktop.
Linux & ffmpeg: One-liner to record your screen along with audio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
resolution="$1" | |
if [[ -z "$resolution" ]]; then | |
resolution="1366x768" | |
echo "[WARN] No resolution passed. Defaulting to $resolution." | |
fi | |
outfile="$2" | |
if [[ -z "$outfile" ]]; then | |
outfile="output-$(date +%s).mkv" | |
fi | |
# The input devices might need to changed depending on your setup | |
ffmpeg -f x11grab -s $resolution -i :0.0 -f alsa -i default $outfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment