Categories: Raspberry pi

raspberry pi camera module script

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



Matus

Share
Published by
Matus

Recent Posts

Referral links

Listen to radio 1 Listen to radio 2 Listen to radio 3 Listen to radio…

5 years ago

update samsung smart iptv app

Instructions how to update samsung smart iptv app. Bellow instructions also work for all other…

7 years ago

ambient light samsung tv philips hue

What is ambient light samsung tv philips hue? Easy way how to setup ambient light for…

7 years ago

stream popcorn time samsung smart tv

How to stream popcorn time Samsung smart tv? 1.) Simply start to watch a movie…

8 years ago

how find iptv streams

How find iptv streams via google I was searching for "how find iptv streams" on…

8 years ago

windows tips and tricks sites

Following sites are good source of inspiration for tips and tricks for windows, software, gadgets,…

8 years ago