Thenior wrote:You should probably use some kind of capture card, so all you're doing is recording video input.
You can do this, except that limits the resolution that you can use.
I struggled with this stuff for a while. I'd recommend that you check out recordmydesktop.
Here's my script to record game-play:
Code: Select all
#!/bin/sh
#record.sh
cd ~
if test -f pid.log
then
cat ~/pid.log | xargs kill -s int
killall parec
rm pid.log
sleep 600
rec-comp.sh
else
window=`xwininfo -name "StarCraft II" | grep -i "StarCraft II" | awk {'print $4'}`
echo $window
recordmydesktop --no-sound --full-shots --windowid $window &
# parec -d alsa_output.pci-0000_03_05.0.analog-stereo.monitor | sox -t raw -r 44100 -sb 16 -c 2 - audiorec.wav &
PROCNAME="recordmydesktop"
PID=`ps -ef | grep -i $PROCNAME | grep -v grep | awk {'print $2'} | head -1`
echo $PID > pid.log
fi
I tied this script to a hotkey... hit the hotkey once, and it starts recording, hit it again and it stops the recording and launches a compress script that encodes the output:
Code: Select all
#!/bin/sh
#rec-comp.sh
if test -f out.ogv
then
mencoder -profile desktop1 -audiofile audiorec.wav -o /dev/null out.ogv
date '+%F-%R.avi' | xargs -t mencoder $1 -profile desktop2 out.ogv -audiofile audiorec.wav -o
rm divx2pass.log
rm out.ogv
rm audiorec.wav
fi
and the mencoder profile:
Code: Select all
[desktop1]
ovc=xvid=1
oac=mp3lame=1
ffourcc=DX50=1
xvidencopts=pass=1:bitrate=1000:threads=3
lameopts=cbr=1:br=128
[desktop2]
ovc=xvid=1
oac=mp3lame=1
ffourcc=DX50=1
xvidencopts=pass=2:bitrate=1000:threads=3
lameopts=cbr=1:br=128
It's been a while since I used the scripts, so they probably need some tweaking. I didn't have the audio recording portion in use, so no promises on that- last time I messed with it was while I was running pulseaudio. It'd need some help to be converted over to alsa. I'd probably use arecord instead of sox.
I found that recordmydesktop didn't take many resources.... it just needs to write a lot to the disk.