ffmpeg
extract audio from video
ffmpeg -i input-video.mkv -q:a 0 -map a output-audio.mp3
record a video
without audio
ffmpeg -f x11grab -r 15 -i :0.0 -acodec libmp3lame -vcodec mpeg4 -ar 48000 -qscale 0 -framerate 24 outputvideo.avi
with audio
ffmpeg -f alsa -ac 2 -i alsa -f x11grab -r 15 -i :0.0 -acodec libmp3lame -vcodec mpeg4 -ar 48000 -qscale 0 -framerate 24 outputvideo.avi
convert video format
ffmpeg -i videofile.mp4 videofile.webm
adjust crf
adjust constant rate factor to lower bit rate
ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4