Skip to content

Instantly share code, notes, and snippets.

@Decstasy
Created April 15, 2019 13:49
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 Decstasy/c6f62ef9b42e8f321bcf13c2d19cea13 to your computer and use it in GitHub Desktop.
Save Decstasy/c6f62ef9b42e8f321bcf13c2d19cea13 to your computer and use it in GitHub Desktop.
Starts VLC RTSP Stream from Raspberry Pi Camera
#!/bin/bash
ip=( $(ip a | grep inet | grep -v 127.0.0 | grep -oP '(\d{1,3}.){3}\d{1,3}') )
echo "Connect with VLC Media Player via Network stream: rtsp://${ip[0]}:8554/"
echo "Press enter to start the stream..."
read lol
raspivid -o - -t 0 -n | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment