You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo cp /opt/vc/lib/*.so /usr/lib/aarch64-linux-gnu/ cd ..
Build and install mjpg-streamer
git clone https://github.com/jacksonliam/mjpg-streamer.git cd mjpg-streamer cd mjpg-streamer-experimental make distclean make CMAKE_BUILD_TYPE=Debug sudo make install
Check if your camera is detect and enabled
vcgencmd get_camera
This should return: supported=1 detected=1
If it doesn't:
sudo vim /boot/firmware/config.txt
and add start_x=1 to the very end of the file, save, then reboot.
If you eventually get: supported=1 detected=1, return to the /mjpg-streamer/mjpg-streamer-experimental/ directory, and try:
sudo chmod +x ./start.sh ./start.sh
If that doesn't work, while you are still in /mjpg-streamer/mjpg-streamer-experimental/:
# /boot/firmware/config.txt
# Automatically load overlays for detected cameras
#camera_auto_detect=1
camera_auto_detect=0
...
# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
#disable_fw_kms_setup=1
...
[all]
start_x=1
For those having trouble getting their camera to work with newer Raspberry Pis (works on Ubuntu 20.04), try this:
install mjpg-streamer dependencies
sudo apt-get update
sudo apt-get install cmake libjpeg8-dev
sudo apt-get update
install aarch64 gcc and g++ for userland
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
sudo apt-get update
Thanks to waveform80/picamera#540 (comment):
download userland
git clone https://github.com/raspberrypi/userland
cd userland
git revert f97b1af1b3e653f9da2c1a3643479bfd469e3b74
press ctrl+o, enter, crtl+x, and enter
git revert e31da99739927e87707b2e1bc978e75653706b9c
press ctrl+o, enter, crtl+x, and enter
Fix /interface/mmal/CMakeLists.txt
sed '/^target_link_libraries(mmal mmal_core mmal_util mmal_vc_client vcos mmal_components)*/i SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-as-needed")' ./interface/mmal/CMakeLists.txt > ./interface/mmal/CMakeLists-temp.txt
mv ./interface/mmal/CMakeLists-temp.txt ./interface/mmal/CMakeLists.txt
Build userland
sudo ./buildme --aarch64
Copy userland libraries
sudo cp /opt/vc/lib/*.so /usr/lib/aarch64-linux-gnu/
cd ..
Build and install mjpg-streamer
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer
cd mjpg-streamer-experimental
make distclean
make CMAKE_BUILD_TYPE=Debug
sudo make install
Check if your camera is detect and enabled
vcgencmd get_camera
This should return: supported=1 detected=1
If it doesn't:
sudo vim /boot/firmware/config.txt
and add start_x=1 to the very end of the file, save, then reboot.
If you eventually get: supported=1 detected=1, return to the /mjpg-streamer/mjpg-streamer-experimental/ directory, and try:
sudo chmod +x ./start.sh
./start.sh
If that doesn't work, while you are still in /mjpg-streamer/mjpg-streamer-experimental/:
export LD_LIBRARY_PATH="$(pwd)"
./mjpg_streamer -i "input_uvc.so -y -r 1280x720 -f 20" -o "output_http.so -w
pwd./www"
This is the only thing that got it working for me on a Raspberry Pi 4b running arm64 Ubuntu (20.04). I hope something in this mess may help you.
The text was updated successfully, but these errors were encountered: