23 lines
504 B
Bash
Executable File
23 lines
504 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ `cat /tmp/cap` -eq 1 ]
|
|
then
|
|
kill -SIGINT `pidof ffmpeg`
|
|
rm /tmp/cap
|
|
exit 0
|
|
else
|
|
echo 1 > /tmp/cap
|
|
fi
|
|
|
|
|
|
NAME=$1
|
|
if [ $# -eq 0 ]
|
|
then
|
|
NAME=recording
|
|
fi
|
|
|
|
(sleep 2; jack_connect Carla:audio-out1 screencap:input_1)&
|
|
(sleep 2; jack_connect Carla:audio-out2 screencap:input_2)&
|
|
|
|
ffmpeg -video_size 1600x900 -framerate 30 -f x11grab -i :0.0 -f jack -i screencap -c:v libx264 -crf 0 -preset ultrafast -c:a flac -ac 2 -ar 48000 ~/recordings/`date +%s`_output.mkv > /tmp/ffmpeg.log 2>&1
|