Capturing the MIR screen for presentation, talks etc. on a X11 desktop

Launch on the phone my script ~/cast.sh which will do:

#!/bin/sh
srcIP=`echo $SSH_CLIENT | cut -f1 -d' '`
port=12345
printf "mirscreencast'ing to %s port %s\n" $srcIP $port

# note about --cap-interval / -n and resulting fps (for mplayer):
# --cap-interval 10 -n 6   gives: 6  frames per sec (use fps=6 in myplayer)
# --cap-interval 1  -n 1   gives: 60 frames per sec (use fps=60 in myplayer)
# the later of course with a high cost of launching 60 time per sec
# the application 'mirscreencast' :-(
# and this only due to a bug in 'mirscreencast'; see:
# https://bugs.launchpad.net/mir/+bug/1439549
#
# the bug was fixed with OTA-4 (r23) in June 2015, we do not need the while loop
# anymore, but who know; we keep it for now

### while true; do
###   mirscreencast -m /run/mir_socket --stdout --cap-interval 1 -s 270 480 -n 1 || break
### done | gzip -c | nc $srcIP $port

mirscreencast -m /run/mir_socket --stdout --cap-interval 1 -s 270 480 \
    | gzip -c | nc $srcIP $port

one must use USB tethering (Wifi seems to be to poor for the mass data of the frames);

and launch first on the host 10.42.0.64 the presenter script ~/readScreenCast.sh which uses mplayer to present the cast:

#!/bin/sh

# read the 'mirscreencast' from the Ubuntu phone's MIR server
# see there 'cast.sh'
#
# co guru@unixarea.de, April 2015

nc -l 12345 | gzip -dc |\
    mplayer -demuxer rawvideo -rawvideo fps=60:w=270:h=480:format=rgba -

works fine!

Last updated: Sat Oct 17 13:09:43 CEST 2015

Last updated