Camera installation


#1

hi,

I have physically installed the RPI camera but having issues when running the GitHub commands.

following the video and the github commands
enabled the camera at raspi-config

these commands completed:

cd mjpg-streamer-experimental
make
sudo make install

the one below fails:

pi@ricardopi:~ $ mjpg_streamer -o “output_http.so -w ./www” -i “input_raspicam.so”
MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
ERROR: could not find input plugin
Perhaps you want to adjust the search path with:
# export LD_LIBRARY_PATH=/path/to/plugin/folder
dlopen: input_raspicam.so: cannot open shared object file: No such file or directory


#2

My notes show:

1 sudo raspi-config > interfacing options > camera enable
2 sudo reboot
3 git clone https://github.com/jacksonliam/mjpg-streamer
4 sudo apt install cmake libjpeg8-dev
(ensure sudo apt install gcc g++ is installed)
5 cd mjpg-streamer/mjg-streamer-expermental
6 make
7 sudo make install
8 ./mjpg_streamer -o “output_http.so -w ./www” -i “input_raspicam.so”
9 Note: If problem, ensure not already running using sudo netstat -ltnup | grep 8080


#3

Jax,

confirmed all steps.

=================================
Note that step 4 fails and had to use
‘’
pi@ricardopi:~ $ sudo apt install cmake libjpeg8-dev
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package libjpeg8-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libjpeg9-dev libjpeg62-turbo-dev

E: Package ‘libjpeg8-dev’ has no installation candidate
pi@ricardopi:~ $ sudo apt install cmake libjpeg9-dev
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
libjpeg9-dev is already the newest version (1:9b-1).
cmake is already the newest version (3.18.4-2+rpt1+rpi1+deb11u1).
The following packages were automatically installed and are no longer required:
libfuse2 libmbim-glib4 libmbim-proxy libqmi-glib5 libqmi-proxy
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
‘’

=====================================

When I get to step 8:

pi@ricardopi:~/mjpg-streamer/mjpg-streamer-experimental $ sudo netstat -ltnup | grep 8080
pi@ricardopi:~/mjpg-streamer/mjpg-streamer-experimental $ ./mjpg_streamer -o “output_http.so -w ./www” -i “input_raspicam.so”
./mjpg_streamer: invalid option – ‘w’

Usage: ./mjpg_streamer
-i | --input “<input-plugin.so> [parameters]”
-o | --output “<output-plugin.so> [parameters]”
[-h | --help ]…: display this help
[-v | --version ]…: display version information
[-b | --background]…: fork to the background, daemon mode

Example #1:
To open an UVC webcam “/dev/video1” and stream it via HTTP:
./mjpg_streamer -i “input_uvc.so -d /dev/video1” -o “output_http.so”

Example #2:
To open an UVC webcam and stream via HTTP port 8090:
./mjpg_streamer -i “input_uvc.so” -o “output_http.so -p 8090”

Example #3:
To get help for a certain input plugin:
./mjpg_streamer -i “input_uvc.so --help”

In case the modules (=plugins) can not be found:

  • Set the default search path for the modules with:
    export LD_LIBRARY_PATH=/path/to/plugins,
  • or put the plugins into the “/lib/” or “/usr/lib” folder,
  • or instead of just providing the plugin file name, use a complete
    path and filename:
    ./mjpg_streamer -i “/path/to/modules/input_uvc.so”

#4

if I go to :
http://192.168.0.207:8080/?action=stream

nothing:

This site can’t be reached

192.168.0.207 refused to connect.


#5

pi@ricardopi:~/mjpg-streamer/mjpg-streamer-experimental $ vcgencmd get_camera
supported=1 detected=1, libcamera interfaces=0


#6

If I run the command I do see the camera for a couple seconds

pi@ricardopi:~/mjpg-streamer/mjpg-streamer-experimental $ raspistill -o test.jpg


#7

At Step 8 try running using straight quote marks, not curly quote marks. The enclosed code is misinterpreted as it is now.


#8

noticed that my error was saying that I dont have raspicam.so file and indeed it wasn’t showing up under the folder. Run a different command using input_uvc and it worked

pi@ricardopi:~/mjpg-streamer/mjpg-streamer-experimental $ ls
_build Dockerfile input_http.so makedeb.sh mjpg_streamer.c output_file.so output_udp.so README.md test.jpg utils.h
cmake docker-start.sh input_uvc.so Makefile mjpg_streamer.h output_http.so plugins scripts TODO www
CMakeLists.txt input_file.so LICENSE mjpg_streamer mjpg_streamer@.service output_rtsp.so postinstall.sh start.sh utils.c

pi@ricardopi:~/mjpg-streamer/mjpg-streamer-experimental $ ./mjpg_streamer -o “output_http.so -w ./www” -i “input_uvc.so”
MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: -1
i: Format…: JPEG
i: TV-Norm…: DEFAULT