Skip to content

Instantly share code, notes, and snippets.

@lduboeuf
Created December 6, 2017 09:54
Show Gist options
  • Save lduboeuf/f33b230b554c2d0e8e7259348329af25 to your computer and use it in GitHub Desktop.
Save lduboeuf/f33b230b554c2d0e8e7259348329af25 to your computer and use it in GitHub Desktop.
screen casting UT device
#!/bin/bash
SCREEN_WIDTH=384
SCREEN_HEIGHT=640
PORT=1234
FORMAT=rgba
if [[ $# -eq 0 ]] ; then
echo 'usage: ./mircast UT_IP_ADDRESS , e.g: ./mircast 192.168.1.68'
exit 1
fi
IP=$1
LOCAL_COMMAND='nc -l -p $PORT | gzip -dc | mplayer -demuxer rawvideo -rawvideo w=$SCREEN_WIDTH:h=$SCREEN_HEIGHT:format=$FORMAT -'
REMOTE_COMMAND="mirscreencast -m /run/mir_socket --stdout --cap-interval 1 -s $SCREEN_WIDTH $SCREEN_HEIGHT | gzip -c | nc \$SSH_CLIENT $PORT"
ssh -f phablet@$IP "$REMOTE_COMMAND"
eval $LOCAL_COMMAND
@lduboeuf
Copy link
Author

lduboeuf commented Dec 6, 2017

prerequisite: computer can ssh to UT device, mplayer installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment