#!/bin/bash

trap 'kill 0' SIGINT

ffmpeg \
    -f x11grab -video_size 1920x1080 -framerate 30 -i "$DISPLAY" \
    -f pulse -i default \
    -filter:a "afftdn=nf=-30,highpass=f=80,lowpass=f=12000" \
    -c:v libx264 -preset ultrafast \
    -c:a aac \
    ~/Videos/capscreen.mkv &




## RECORD WEBCAM TO SEPARATE FILE ##
ffmpeg \
    -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0 \
    -c:v libx264 -preset ultrafast \
    ~/Videos/webcam.mkv &

# Wait for background jobs
wait




