Ssh – pipe /dev/video over ssh

sshssh-tunnelingvideo

I have two computers, a desktop in my office ( with a webcam attached ) and a laptop somewhere else on the network.

Usually I take a look at my office through my webcam by running

ssh Office -Y "mplayer tv://device=/dev/video0"

from my laptop. I don't like Xforwarding mplayer, so why can't I tunnel /dev/video to my pc by running this on my laptop?

sudo mkfifo /dev/video1
ssh Office 'dd if=/dev/video' | sudo dd of=/dev/video1'

and then to watch the webcam ( on my laptop )

mplayer tv://device=/dev/video1

Best Answer

Something like:

dd if=/dev/video0 | mplayer tv://device=/dev/stdin

works for me (SOA#1) locally. So does:

ssh localhost dd if=/dev/video0 | mplayer tv://device=/dev/stdin

As well as

mkfifo test
dd if=/dev/video0 of=test &
mplayer tv://device=test

Hence:

  1. Try without named pipe
  2. Check bandwidth

Also - how does in not work (display black screen, complains about unknown device etc.)?

Related Question