Hardware:
OSOYOO Web Camera Module for Raspberry Pi
Pi Board: Raspberry Pi 4 (with CSI cable) or Pi 5

Software Installation:
Preinstalled OS: Raspberry Pi Bookworm or Raspberry Pi Bulleye

0) Note: If you use the Raspberry Pi 5, please edit config.txt with the following commend:

sudo nano /boot/firmware/config.txt

If you install the CSI Camera in CSI/DSI 0 port, please keep ‌”camera_auto_detect=0‌” and add “dtoverlay=ov5647,cam0″ at the end of file
If you install the CSI Camera in CSI/DSI 1 port, please change ‌”camera_auto_detect=0‌” to “camera_auto_detect=1” and add “dtoverlay=ov5647,cam1” at the end of file

If you use other model, please replace “ov5647” with other chip model according to your CSI camera(Use lowercase letters).

Click “ctrl” + “X” then “Y” to save the file, then enter commend “sudo reboot” to reboot your Pi.
1)Install utream server
If you are using Bookworm OS, Please run   following commands:

sudo apt install libevent-dev libbsd-dev libcamera-v4l2

sudo apt-get install libcairo2-dev libjpeg62-turbo-dev libpango1.0-dev libgif-dev build-essential g++
sudo apt-get install libjpeg-dev
wget https://osoyoo.com/driver/v5car/ustreamer.tar.gz
wget https://osoyoo.com/driver/v5car/utbegin.sh
tar -zxvf ustreamer.tar.gz
cd ustreamer 
make

If you feel above commands are too complicated, don’t worry, we have put these commands into a shell script file, you can   simply run following commands to install ustream

wget https://osoyoo.com/driver/v5car/ut-bookworm.sh

bash ut-bookworm.sh

If you are using Bulleye OS, please run following command:

wget https://osoyoo.com/driver/v5car/ut-bulleye.sh

bash ut-bulleye.sh

2)Start the server
To start the webcam server, please run following command:

libcamerify ./ustreamer --host 0.0.0.0 --port=8899 --device=/dev/video0 -m yuyv --encoder=m2m-video --device-timeout=5 --buffers=3 --resolution=1280x720 --desired-fps=20

or if you think above command is too complicate , you can also run following command:

bash utbegin.sh

Once you started the ustreamer server, you can use your web browser to visit :
http://your_raspberry_pi_ip_address:8899 to see the web camera

If you don’t know your_raspberry_pi_ip_address, please type following command in Raspberry Pi terminal:

hostname -I

For example, if your hostname -I command shows:

192.168.1.19 2604:3d08:507c:c800::639d 2604:3d08:507c:c800:4310:a8e3:a8fc:a5e2 

it means your Pi IP is 192.168.1.19, so you can use
http://192.168.1.19:8899 to see your web camera video stream