raspberry pi camera module script


Warning: Undefined array key "ssba_bar_buttons" in /data/f/0/f0e71dcf-4f5a-4882-8c33-9944a28d7ed9/matusbankovic.com/web/wp-content/plugins/simple-share-buttons-adder/php/class-buttons.php on line 602

My Raspberry pi camera module script

Scenario:

Raspberry pi B
Camera Module
Wifi Dongle

Goal:

Stream the video from raspberry pi Camera module nonstop in local network even after a reboot of the raspberry pi.

  1. Camera module setup
  2. Wifi dongle setup
  3. Official V4L2 driver setup
  4. Installed VLC
    • sudo apt-get install vlc

  5. Created script to lunch streaming combined V4L2 + cvlc
    • sudo nano myscript.sh
    • #!/bin/bashsudo modprobe bcm2835-v4l2cvlc v4l2:///dev/video0 –v4l2-width 1920 –v4l2-height 1080 –v4l2-chroma h264 –sout ‘#standard{access=http,mux=ts,dst=0.0.0.0:50000}’
    • sudo chmod +x myscript.sh
  6. Installed screen – creates a hidden terminal session
    • sudo apt-get install screen
  7. Adding the script to crontab so by booting / rebooting the script is lunched
    1. crontab -e
    2. @reboot /usr/bin/screen -S test -d -m /bin/bash /scripts/myscript.sh &
  8. Access the stream via VLC by using the IP address of the raspberry pi for example: http://192.168.1.101:50000
  9. Enjoy the stream




Category: Raspberry pi

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.