Skip to content

Instantly share code, notes, and snippets.

@glynhudson
Last active February 12, 2017 01:09
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 glynhudson/725bfe3a57411ad7fbd3810989dfcba6 to your computer and use it in GitHub Desktop.
Save glynhudson/725bfe3a57411ad7fbd3810989dfcba6 to your computer and use it in GitHub Desktop.
Start Raspberry Pi h264 web cam stream
#!/bin/sh
# sudo apt-get install vlc
# sudo apt-get install gstreamer1.0
# sudo apt-get install gstreamer-tools
# https://play.google.com/store/apps/details?id=pl.effisoft.rpicamviewer2
# Launch Stream
echo "Starting Stream"
echo $(date)
_IP=$(ip addr show wlan0 | grep inet | awk '{print $2}' | cut -d/ -f1 | head -n1)
echo $_IP
echo
raspivid -n -t 0 -h 200 -w 320 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=$_IP port=5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment