Überwachungskamera selber bauen mit Raspi
Guten Abend,
ich möchte mit einer Webcam und einem Raspi eine Überwachungskamera bauen.
Dazu habe ich diese AnleitungPi Camera ausprobiert.
Leider ohne Erfolg.
Irgendwie schaffe ich es nicht das sich die Webseite auf dem Pi öffnet wo ich das Kamera Bild sehen sollte.
Im Logfile habe ich folgenden Text.
Was bedeutet der Error?
Wie kann ich den Fehler den ich mache finden?
Ich kenne mich leider mit Linux nicht gut aus.
Danke für die Hilfe
ich möchte mit einer Webcam und einem Raspi eine Überwachungskamera bauen.
Dazu habe ich diese AnleitungPi Camera ausprobiert.
Leider ohne Erfolg.
Irgendwie schaffe ich es nicht das sich die Webseite auf dem Pi öffnet wo ich das Kamera Bild sehen sollte.
Im Logfile habe ich folgenden Text.
[1:ml1] [NTC] [VID] [Jun 29 19:22:27] v4l2_get_capability: - VIDEO_CAPTURE
[1:ml1] [NTC] [VID] [Jun 29 19:22:27] v4l2_get_capability: - STREAMING
[1:ml1] [NTC] [VID] [Jun 29 19:22:27] v4l2_select_input: name = "Camera 1", type 0x00000002, status 00000000
[1:ml1] [NTC] [VID] [Jun 29 19:22:27] v4l2_select_input: - CAMERA
[1:ml1] [ERR] [VID] [Jun 29 19:22:27] v4l2_select_input: Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1:ml1] [NTC] [VID] [Jun 29 19:22:27] vid_v4lx_start: Using V4L1
[1:ml1] [NTC] [ALL] [Jun 29 19:22:27] image_ring_resize: Resizing pre_capture buffer to 1 items
[1:ml1] [ERR] [ALL] [Jun 29 19:22:37] motion_init: Error capturing first image
[1:ml1] [NTC] [STR] [Jun 29 19:22:37] http_bindsock: error binding on any IPv4 address port 8081
[1:ml1] [ERR] [ALL] [Jun 29 19:22:37] motion_init: Problem enabling motion-stream server in port 8081: Address already in use
[1:ml1] [NTC] [ALL] [Jun 29 19:22:37] motion_loop: Thread exiting
[1:ml1] [NTC] [VID] [Jun 29 19:22:37] vid_close: Closing video device /dev/video0
[0:motion] [NTC] [ALL] [Jun 29 19:22:38] main: Motion thread 1 restart
[1:ml1] [NTC] [ALL] [Jun 29 19:22:38] motion_init: Camera 0 started: motion detection Enabled
[1:ml1] [NTC] [VID] [Jun 29 19:22:38] vid_v4lx_start: Using videodevice /dev/video0 and input -1
[1:ml1] [NTC] [VID] [Jun 29 19:22:38] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "C270 HD WEBCAM"
cap.bus_info: "usb-20980000.usb-1.2"
cap.capabilities=0x84A00001
------------------------
[1:ml1] [NTC] [VID] [Jun 29 19:22:38] v4l2_get_capability: - VIDEO_CAPTURE
[1:ml1] [NTC] [VID] [Jun 29 19:22:38] v4l2_get_capability: - STREAMING
[1:ml1] [NTC] [VID] [Jun 29 19:22:38] v4l2_select_input: name = "Camera 1", type 0x00000002, status 00000000
[1:ml1] [NTC] [VID] [Jun 29 19:22:38] v4l2_select_input: - CAMERA
[1:ml1] [ERR] [VID] [Jun 29 19:22:38] v4l2_select_input: Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[1:ml1] [NTC] [VID] [Jun 29 19:22:38] vid_v4lx_start: Using V4L1
[1:ml1] [NTC] [ALL] [Jun 29 19:22:38] image_ring_resize: Resizing pre_capture buffer to 1 items
Was bedeutet der Error?
Wie kann ich den Fehler den ich mache finden?
Ich kenne mich leider mit Linux nicht gut aus.
Danke für die Hilfe
Bitte markiere auch die Kommentare, die zur Lösung des Beitrags beigetragen haben
Content-ID: 3221685685
Url: https://administrator.de/forum/ueberwachungskamera-selber-bauen-mit-raspi-3221685685.html
Ausgedruckt am: 15.05.2025 um 19:05 Uhr
38 Kommentare
Neuester Kommentar
Zitat von @maretz:
Moin,
ich würde einfach mal schauen - kannst du in der Konfig den Port 8082 verwenden (oder irgendeinen anderen)? Damit mal probieren - falls da doch irgendwo mal nen Service abgeschmiert is der da noch was blockiert...
Moin,
ich würde einfach mal schauen - kannst du in der Konfig den Port 8082 verwenden (oder irgendeinen anderen)? Damit mal probieren - falls da doch irgendwo mal nen Service abgeschmiert is der da noch was blockiert...
Ja, oder einfach mal den Pi neustarten.
Das sind ja doch nur eine Handvoll an Befehlen die hier eingetragen werden müssen, das sollte man schon zum fliegen kriegen.
Wie sieht denn die
/etc/motion/motion.conf
Und hast du das "empfohlene" Raspbian Buster vorweg installiert?
Ich kann das am WE hier ev. mal nachbauen, falls es bis dahin noch immer nicht klappen sollte.
So, ich habe das grad mal schnell nachgestellt hier.
Das funktioniert exakt so wie nach Anleitung.
Hab ein frisches Raspbian auf die SD Karte geflashed hab meine Webcam am USB Port angestöpselt und bin exakt nach Anleitung vorgegangen. Hat 10 min gedauert das Ganze.
Starte einfach nochmal von Beginn an oder poste mal die Ausgabe deiner motion.conf bitte.
Ich sehe grad bei deiner Ausgabe von
dass da wohl noch ein Avahi Service läuft. Eventuell spuckt der dir in die Suppe.
Das funktioniert exakt so wie nach Anleitung.
Hab ein frisches Raspbian auf die SD Karte geflashed hab meine Webcam am USB Port angestöpselt und bin exakt nach Anleitung vorgegangen. Hat 10 min gedauert das Ganze.
Starte einfach nochmal von Beginn an oder poste mal die Ausgabe deiner motion.conf bitte.
Ich sehe grad bei deiner Ausgabe von
netstat -tulpn

Danach mal versucht ?
Netzwerk Management Server mit Raspberry Pi
Wenn du systemctl restart motion eingibst bekommst du da irgendwelche Fehlermeldungen?
Netzwerk Management Server mit Raspberry Pi
Wenn du systemctl restart motion eingibst bekommst du da irgendwelche Fehlermeldungen?
Ganz einfach, du hältst dich nicht an die Anleitung.
In der von dir verlinkten Anleitung sind genau 2 Werte als relevant eingestuft. Und nicht mal der erste stimmt bei deiner Config. Alles andere ist optional und kannst du erst mal außer Acht lassen.
Poste doch auch mal die Ausgabe von
ip addr
Gruß

Nochmals..., da du außer sich nicht an Anleitungen zu halten scheinbar Tips ja auch ignorierst... 
Netzwerk Management Server mit Raspberry Pi
mal versucht?
Hier ist ebenso eine wasserdichte Anleitung:
https://strobelstefan.org/2018/02/11/raspberry-pi-und-motion/
Wenn du systemctl restart motion eingibst um dem Motion Daemon neu zu starten, bekommst du da irgendwelche Fehlermeldungen? (cat /var/log/syslog oder cat /var/log/messages)
Netzwerk Management Server mit Raspberry Pi
mal versucht?
Hier ist ebenso eine wasserdichte Anleitung:
https://strobelstefan.org/2018/02/11/raspberry-pi-und-motion/
Wenn du systemctl restart motion eingibst um dem Motion Daemon neu zu starten, bekommst du da irgendwelche Fehlermeldungen? (cat /var/log/syslog oder cat /var/log/messages)
Im deinem Eingangsposting hast du eine Anleitung verlinkt.
In dieser steht mit KEINEM WORT
apt install fswebcam motion
Also entweder willst du uns hier trollen oder einfach nur unsere Geduld prüfen.
Ich wiederhole mich gerne nochmal:
Habe es hier nach DEINER verlinkten Anleitung gemacht, funktioniert einwandfrei.
Gruß
Zitat von @Druckleitung:
und das Sytemlog sagt
ich bin anscheinend zu dumm
und das Sytemlog sagt
Jul 3 20:31:20 raspberrypi systemd[1]: Stopped Motion - Security camera monitoring software..
Jul 3 20:31:20 raspberrypi systemd[1]: motion.service: Consumed 4.219s CPU time.
Jul 3 20:31:20 raspberrypi systemd[1]: Started Motion - Security camera monitoring software..
Jul 3 20:31:25 raspberrypi systemd[1]: motion.service: Main process exited, code=killed, status=11/SEGV
Jul 3 20:31:25 raspberrypi systemd[1]: motion.service: Failed with result 'signal'.
Jul 3 20:31:25 raspberrypi systemd[1]: motion.service: Consumed 4.337s CPU time.
Jul 3 20:31:30 raspberrypi systemd[1]: motion.service: Scheduled restart job, restart counter is at 11.
Jul 3 20:31:30 raspberrypi systemd[1]: Stopped Motion - Security camera monitoring software..
Jul 3 20:31:30 raspberrypi systemd[1]: motion.service: Consumed 4.337s CPU time.
Jul 3 20:31:30 raspberrypi systemd[1]: Started Motion - Security camera monitoring software..
Jul 3 20:31:34 raspberrypi systemd[1]: motion.service: Main process exited, code=killed, status=11/SEGV
Jul 3 20:31:34 raspberrypi systemd[1]: motion.service: Failed with result 'signal'.
Jul 3 20:31:34 raspberrypi systemd[1]: motion.service: Consumed 4.324s CPU time.
Jul 3 20:31:39 raspberrypi systemd[1]: motion.service: Scheduled restart job, restart counter is at 12.
Jul 3 20:31:39 raspberrypi systemd[1]: Stopped Motion - Security camera monitoring software..
Jul 3 20:31:39 raspberrypi systemd[1]: motion.service: Consumed 4.324s CPU time.
Jul 3 20:31:39 raspberrypi systemd[1]: Started Motion - Security camera monitoring software..
Nana, so voreilig wollen wir nicht sein
Dann ev. mal einen Step zurück.
Welchen RaspberryPi hast du und welches OS hast du auf die SD Karte geflashed mit welcher Methode?
Hier ist mal meine motion.conf
Wenn es damit nicht geht, liegts wohl an deiner Hardware oder was anderem was du an dem Pi gemacht hast.
Gruß
# Rename this distribution example file to motion.conf
#
# This config file was generated by motion 4.4.0
# Documentation: /usr/share/doc/motion/motion_guide.html
#
# This file contains only the basic configuration options to get a
# system working. There are many more options available. Please
# consult the documentation for the complete list of all options.
#
############################################################
# System control configuration parameters
############################################################
# Start in daemon (background) mode and release terminal.
daemon off
# Start in Setup-Mode, daemon disabled.
setup_mode off
# File to store the process ID.
; pid_file value
# File to write logs messages into. If not defined stderr and syslog is used.
; log_file value
# Level of log messages [1..9] (EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL).
log_level 6
# Target directory for pictures, snapshots and movies
; target_dir value
# Video device (e.g. /dev/video0) to be used for capturing.
video_device /dev/video0
# Parameters to control video device. See motion_guide.html
; vid_control_params value
# The full URL of the network camera stream.
; netcam_url value
# Name of mmal camera (e.g. vc.ril.camera for pi camera).
; mmalcam_name value
# Camera control parameters (see raspivid/raspistill tool documentation)
; mmalcam_control_params value
############################################################
# Image Processing configuration parameters
############################################################
# Image width in pixels.
width 640
# Image height in pixels.
height 480
# Maximum number of frames to be captured per second.
framerate 100
# Text to be overlayed in the lower left corner of images
text_left CAMERA1
# Text to be overlayed in the lower right corner of images.
text_right %Y-%m-%d\n%T-%q
############################################################
# Motion detection configuration parameters
############################################################
# Always save pictures and movies even if there was no motion.
emulate_motion off
# Threshold for number of changed pixels that triggers motion.
threshold 1500
# Noise threshold for the motion detection.
; noise_level 32
# Despeckle the image using (E/e)rode or (D/d)ilate or (l)abel.
despeckle_filter EedDl
# Number of images that must contain motion to trigger an event.
minimum_motion_frames 1
# Gap in seconds of no motion detected that triggers the end of an event.
event_gap 60
# The number of pre-captured (buffered) pictures from before motion.
pre_capture 3
# Number of frames to capture after motion is no longer detected.
post_capture 0
############################################################
# Script execution configuration parameters
############################################################
# Command to be executed when an event starts.
; on_event_start value
# Command to be executed when an event ends.
; on_event_end value
# Command to be executed when a movie file is closed.
; on_movie_end value
############################################################
# Picture output configuration parameters
############################################################
# Output pictures when motion is detected
picture_output off
# File name(without extension) for pictures relative to target directory
picture_filename %Y%m%d%H%M%S-%q
############################################################
# Movie output configuration parameters
############################################################
# Create movies of motion events.
movie_output on
# Maximum length of movie in seconds.
movie_max_time 60
# The encoding quality of the movie. (0=use bitrate. 1=worst quality, 100=best)
movie_quality 45
# Container/Codec to used for the movie. See motion_guide.html
movie_codec mkv
# File name(without extension) for movies relative to target directory
movie_filename %t-%v-%Y%m%d%H%M%S
############################################################
# Webcontrol configuration parameters
############################################################
# Port number used for the webcontrol.
webcontrol_port 8080
# Restrict webcontrol connections to the localhost.
webcontrol_localhost on
# Type of configuration options to allow via the webcontrol.
webcontrol_parms 0
############################################################
# Live stream configuration parameters
############################################################
# The port number for the live stream.
stream_port 8081
# Restrict stream connections to the localhost.
stream_localhost off
##############################################################
# Camera config files - One for each camera.
##############################################################
; camera /usr/etc/motion/camera1.conf
; camera /usr/etc/motion/camera2.conf
; camera /usr/etc/motion/camera3.conf
; camera /usr/etc/motion/camera4.conf
##############################################################
# Directory to read '.conf' files for cameras.
##############################################################
; camera_dir /usr/etc/motion/conf.d
Wenn es damit nicht geht, liegts wohl an deiner Hardware oder was anderem was du an dem Pi gemacht hast.
Gruß
Eine C920
Ist es bei mir auch nicht. Ruckelt natürlich - weil wie gesagt - nicht dafür ausgelegt.
Ich dachte das ganze könnte brauchbar sein:/
Ist es bei mir auch nicht. Ruckelt natürlich - weil wie gesagt - nicht dafür ausgelegt.
wenn sie jemanden abschrecken soll, ist es gut wenn man sie sieht.
wenn du was anderes vorhast, ist es creepy.

Dann kauf eine Reolink.
Oder wenn Basteln im Vordergrund steht:https://www.heise.de/select/make/2020/1/1583171309937840
https://www.heise.de/select/make/2020/6/2014805265336107946