Skip to content

Instantly share code, notes, and snippets.

@robagar
Last active July 27, 2021 06:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robagar/c9398eb8bd953ee6ff5a9ec5afe9241b to your computer and use it in GitHub Desktop.
Save robagar/c9398eb8bd953ee6ff5a9ec5afe9241b to your computer and use it in GitHub Desktop.
RMS Meteor Camera Video Tunnel
[Unit]
Description=RMS Meteor Camera Video Tunnel
After=network.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/full/path/to/tunnel.sh
[Install]
WantedBy=multi-user.target
#!/bin/bash
socat tcp-listen:34567,reuseaddr,fork tcp:192.168.42.10:34567 &
socat tcp-listen:8899,reuseaddr,fork tcp:192.168.42.10:8899 &
socat tcp-listen:554,reuseaddr,fork tcp:192.168.42.10:554 &
socat UDP4-RECVFROM:554,reuseaddr,fork UDP4-SENDTO:192.168.42.10:554 &
@robagar
Copy link
Author

robagar commented Jul 27, 2021

How to use

  1. copy tunnel.sh to anywhere you like on the Raspberry Pi

As root:

  1. copy tunnel.service to /etc/systemd/system
  2. edit the ExecStart line to match where you copied tunnel.sh on your system
  3. start the service with
systemctl start tunnel.service
  1. if you want it to start automatically on boot
systemctl enable tunnel.service

Then to watch the live video open VLC on your PC/Mac/whatever (on the same network)

File -> Open Network with an url like this, replacing {raspbery pi address} with the actual address of the Raspberry Pi

rtsp://{raspbery pi address}:554/user=admin&password=&channel=1&stream=0.sdp

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