Skip to content

Instantly share code, notes, and snippets.

@lopezpdvn
Last active July 10, 2016 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lopezpdvn/4521b20f9e91a9975621626749d55418 to your computer and use it in GitHub Desktop.
Save lopezpdvn/4521b20f9e91a9975621626749d55418 to your computer and use it in GitHub Desktop.
Screencast with ffmpeg
#!/bin/sh -
# Example values
pulseaudio_source=0
thread_queue_size=32
video_size=1920x1080
framerate=30
record_area=$DISPLAY+0,0
naudio_channels=2
outfile=capture.mkv
# Command
ffmpeg -thread_queue_size $thread_queue_size -video_size $video_size \
-framerate $framerate -f x11grab -i $record_area \
-thread_queue_size $thread_queue_size -f pulse -ac $naudio_channels \
-channel_layout stereo -i $pulseaudio_source -c:v libx264 -qp 0 \
-preset ultrafast -c:a libvorbis $outfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment