Piping video over ssh

My situation is not the same depicted inCan I pipe /dev/video over ssh” but I have a similar need. See an audio-video flow from an RTSP camera which is not accessible – by choice! – from the net but there is an accessible Linux machine which can talk to such a camera.

So in my case it’s just as simple as

ssh $USER@$SERVER -p $MYPORT ffmpeg -i rtsp:$IP_OF_RTSP_CAMERA:$RTSP_PORT/s0  -f matroska - |ffplay -f matroska /dev/stdin

Actually the machine is not directly on the net but I use sidedoor which maintains an SSH connection or tunnel with a shell script daemon.

One Reply to “Piping video over ssh”

  1. To pipe the microphone
    ssh $USER@$SERVER -p $MYPORT ffmpeg -f pulse -i alsa_input.pci-0000_00_1b.0.analog-stereo -f mp3 – | ffplay -f mp3 /dev/stdin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.