forked from MEGA65/mega65-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
record-m65
executable file
·25 lines (25 loc) · 955 Bytes
/
record-m65
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if [ "x$1" == "x" ]; then
echo "usage: record-m65 <network interface>"
echo ""
echo "NOTE: You must first enable the ethernet video stream on the MEGA65"
echo " sffd36e1 29 from the serial monitor interface will do this."
exit
fi
make bin/videoproxy bin/vncserver
pkill vncserver
sudo echo
sudo ifconfig $1 mtu 9000
sudo bin/videoproxy $1 &
sleep 1
bin/vncserver &
sleep 1
vncviewer localhost &
sleep 2
xwininfo -name "VNC: MEGA65 Remote Display"
x1=`xwininfo -name "VNC: MEGA65 Remote Display" | grep "Absolute upper-left X:" | cut -f2 -d: | sed s'/ //g'`
y1=`xwininfo -name "VNC: MEGA65 Remote Display" | grep "Absolute upper-left Y:" | cut -f2 -d: | sed s'/ //g'`
wmctrl -a "VNC: MEGA65 Remote Display"
rm output.mp4
echo ffmpeg -video_size 800x600 -framerate 50 -f x11grab -show_region 1 -i :0.0+${x1},${y1} output.mp4
ffmpeg -video_size 800x600 -framerate 50 -f x11grab -show_region 1 -i :0.0+${x1},${y1} output.mp4
pkill vncserver