Last active
May 12, 2017 01:40
-
-
Save facundovictor/d4a1355bc7cf0d6f3287424aa4654478 to your computer and use it in GitHub Desktop.
Recording screen with ffmpeg
This file contains hidden or 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
#!/usr/bin/env bash | |
# | |
# References: | |
# - https://trac.ffmpeg.org/wiki/Capture/Desktop | |
############################################################################### | |
# -s[:stream_specifier] size | |
# Better option : -video_size size | |
RESOLUTION="1366x768" | |
# -r[:stream_specifier] fps | |
# Better option : -framerate size | |
FPS=25 | |
# -f fmt (input/output) Force input or output file format | |
FORMAT=x11grab | |
# -i url (input) | |
INPUT=":0.0" | |
# Save it to: | |
OUTPUT=~/output-file.mp4 | |
if [ -n "$1" ]; then | |
OUTPUT="$1" | |
fi | |
ffmpeg -f $FORMAT -video_size $RESOLUTION -framerate $FPS -i $INPUT "$OUTPUT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment