#!/bin/bash
# quickly get pi cam stream to local pc display, from pc go:
# requires:{nc,mplayer,hostname}@local&{raspivid,nc}@remote
command -v nc >/dev/null 2>&1 || { echo >&2 "Bummer"; exit 1; }
command -v mplayer >/dev/null 2>&1 || { echo >&2 "Bummer"; exit 1; }
ip=$(hostname -I)
stty -echo;echo -n "Enter user @ raspberry: ";read usr;echo;stty echo
xterm -e 'nc -l 5001 | mplayer -fps 31 -cache 1024 -' &
ssh $usr@pi.local "raspivid -t 99999 -o - | nc $ip 5001"
pi&cam
Leave a reply