druckleitung
Goto Top

Ü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.
[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

Content-Key: 3221685685

Url: https://administrator.de/contentid/3221685685

Ausgedruckt am: 19.03.2024 um 06:03 Uhr

Mitglied: michi1983
michi1983 30.06.2022 um 21:09:55 Uhr
Goto Top
Hallo,

es scheint so als ob auf deinem Gerät bereits ein anderer Service auf Port 8081 läuft.

Poste doch mal das Ergebnis von
netstat -tulpn

Gruß
Mitglied: Druckleitung
Druckleitung 30.06.2022 um 21:15:48 Uhr
Goto Top
Zitat von @michi1983:

Hallo,

es scheint so als ob auf deinem Gerät bereits ein anderer Service auf Port 8081 läuft.

Poste doch mal das Ergebnis von
netstat -tulpn

Gruß

Guten Abend,
danke für die Hilfe.
Hier die Ausgabe
root@raspberrypi:/var/log/motion# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      367/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      367/sshd
udp        0      0 0.0.0.0:68              0.0.0.0:*                           267/dhcpcd
udp        0      0 0.0.0.0:59531           0.0.0.0:*                           224/avahi-daemon: r
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           224/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                224/avahi-daemon: r
udp6       0      0 :::35331                :::*                                224/avahi-daemon: r
Mitglied: michi1983
michi1983 30.06.2022 um 23:49:03 Uhr
Goto Top
Hast du die Anleitung aus dem Video oder die textuelle verwendet?
Mitglied: Druckleitung
Druckleitung 01.07.2022 um 05:05:53 Uhr
Goto Top
Zitat von @michi1983:

Hast du die Anleitung aus dem Video oder die textuelle verwendet?

Ich habe die "textuelle " verwndet!
Danke für die Hilfe
Mitglied: maretz
maretz 01.07.2022 um 06:42:49 Uhr
Goto Top
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...
Mitglied: michi1983
michi1983 01.07.2022 aktualisiert um 10:34:22 Uhr
Goto Top
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...

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
aus?

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.
Mitglied: michi1983
michi1983 01.07.2022 um 10:34:29 Uhr
Goto Top
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
netstat -tulpn
dass da wohl noch ein Avahi Service läuft. Eventuell spuckt der dir in die Suppe.
Mitglied: 148523
148523 01.07.2022 um 11:20:26 Uhr
Goto Top
Mitglied: Druckleitung
Druckleitung 02.07.2022 um 09:46:05 Uhr
Goto Top
Guten Morgen,
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...

Das hat leider nichts gebracht.

Und hast du das "empfohlene" Raspbian Buster vorweg installiert?
Nein habe ich nicht ich hatte verstanden das Buster veraltet ist. Irre ich da?

Ich kann das am WE hier ev. mal nachbauen, falls es bis dahin noch immer nicht klappen sollte.
Wäre nett wenn das geht?


Zitat von @michi1983:

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
netstat -tulpn
dass da wohl noch ein Avahi Service läuft. Eventuell spuckt der dir in die Suppe.

Ich habe jetzt 2 mal bei Null angefangen aber ohne Erfolg. ich kann die Webgui des Raspi nie öffnen.



Ich habe auch versucht nach dem zweiten Link die Anleitung aus dem Forum nach zu bauen.
Ich kann mit dem Befehl
fswebcam -r 640x480 -p YUYV -v /home/pi/testbild.jpg
ein Bild machen aber auch hier kann ich die Webseite meines pi 10.99.99.67:8081 nicht öffnen.

Kann mir mal jemand eine laufende motion.conf geben?
ich hänge auch meine mal an.
Danke für die Hilfe
# 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 on

# 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 5

# 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 off

# 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
daemon on
v4l2_palette 6
width 640
height 480
framerate 5
quality 75
output_normal off
ffmpeg_cap_new off
text_right %d-%m-%Y\n%T
target_dir /srv/motion
webcam_quality 75
webcam_maxrate 15
webcam_localhost off 
Mitglied: michi1983
michi1983 02.07.2022 um 14:04:56 Uhr
Goto Top
Sorry, aber du hast nicht von null begonnen.

Deine Werte in der motion.conf stimmen nicht mit denen in der Anleitung überein.

Nochmal genau lesen und einfach nachmachen, keine Experimente.

Gruß
Mitglied: Druckleitung
Druckleitung 03.07.2022 um 09:32:30 Uhr
Goto Top
Guten Morgen,
ich habe jetzt einige male die Sd Karte neu mit Pi OS geflasht.
Habe einige versucht die Anleitung penibel durchzuführen.
Forum
mit dieser Anleitung schaffe ich es zumindest ein Bild zu machen.
Jedoch auch mit dieser Anleitung zeigt wir der Pi die Webseite von Motion nicht an.

Was mache ich falsch?
Kann mir jemand die Korrektheit der Anleitung bestätigen?
Vielen lieben Dank für Eure Hilfe und Euer wissen.
Mitglied: 148523
148523 03.07.2022 um 10:08:12 Uhr
Goto Top
Danach mal versucht ?
Netzwerk Management Server mit Raspberry Pi
Wenn du systemctl restart motion eingibst bekommst du da irgendwelche Fehlermeldungen?
Mitglied: michi1983
michi1983 03.07.2022 aktualisiert um 14:31:38 Uhr
Goto Top
Zitat von @Druckleitung:
Was mache ich falsch?

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ß
Mitglied: Druckleitung
Druckleitung 03.07.2022 aktualisiert um 15:29:25 Uhr
Goto Top
Zitat von @michi1983:

Zitat von @Druckleitung:
Was mache ich falsch?

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ß

Welche 2 Werte meinst du?
Warum ist nach der neuinstallation von motiuon auf meinem Pi in der motion.conf der Eintrag
stream_localhost off
nicht vorhanden?
Die Ausgabe von ip addr ist
ip addrpi@spy:~ $ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defaul                                                                                                             t qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP gr                                                                                                             oup default qlen 1000
    link/ether b8:27:eb:70:b1:e5 brd ff:ff:ff:ff:ff:ff
    inet 10.99.99.67/24 brd 10.99.99.255 scope global dynamic noprefixroute eth0
       valid_lft 8178sec preferred_lft 6828sec
    inet6 fe80::e4fd:e7f1:9b5e:b0d4/64 scope link
       valid_lft forever preferred_lft forever
Hilft es wenn ich nochmal raspian neu aufsetze und nochmal Schritt für Schritt
hier aufschreibe was ich mache?
Danke für die Hilfe
Mitglied: 148523
148523 03.07.2022 aktualisiert um 17:34:15 Uhr
Goto Top
Nochmals..., da du außer sich nicht an Anleitungen zu halten scheinbar Tips ja auch ignorierst... face-sad
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)
Mitglied: Druckleitung
Druckleitung 03.07.2022 aktualisiert um 19:00:59 Uhr
Goto Top
So habe nun abermal die Sd Karte neu geflasht.
Dann mit raspi-config die Partition vergrößert.

Dann folgende commands ausgeführt.
sudo apt update
sudo apt upgrade
apt install fswebcam motion
im Beitrag ist die rede von 2 Pakete ich sehe aber nur apt install fswebcam motion.
fswebcam -r 1280x720 -p YUYV -v /home/pi/testbild.jpg
liefert erfolgreich ein Bild.
die Datei /etc/default/motion existiert nicht muss ich die anlegen?
sudo mkdir /srv/motion
sudo chown motion.motion /srv/motion 
kann ich ohne Fehler ausführen.
in der /etc/motion/motion.conf sind die folgenden Parameter bis auf daemon on nicht vorhanden.
kann ich die Parameter einfach anlegen?
daemon on
v4l2_palette 6
width 640
height 480
framerate 5
quality 75
output_normal off
ffmpeg_cap_new off
text_right %d-%m-%Y\n%T
target_dir /srv/motion
webcam_quality 75
webcam_maxrate 15
webcam_localhost off 

der Befehl
sudo /etc/init.d/motion restart
sudo: /etc/init.d/motion: command not found
liefert einen Fehler.
Wie soll ich weitermachen?
bitte helft mir ich bin Anfänger und komme einfach nicht weiter
hat jemand Lust mit einen aktuellen Raspain Os das ganze zu testen?
Danke
Mitglied: Druckleitung
Druckleitung 03.07.2022 um 19:02:11 Uhr
Goto Top
Zitat von @148523:

Nochmals..., da du außer sich nicht an Anleitungen zu halten scheinbar Tips ja auch ignorierst... face-sad
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)

Ich versuche die Anleitungen zu folgen leider ist bei mir wie oben erwähnt alles etwas anders als in den Anleitungen.
Danke für die Hilfe
Mitglied: michi1983
michi1983 03.07.2022 um 20:35:33 Uhr
Goto Top
Zitat von @Druckleitung:
sudo apt update
sudo apt upgrade
apt install fswebcam motion

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ß
Mitglied: Druckleitung
Druckleitung 03.07.2022 um 20:56:57 Uhr
Goto Top
Zitat von @michi1983:

Zitat von @Druckleitung:
sudo apt update
sudo apt upgrade
apt install fswebcam motion

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ß

Sorry ich will niemanden auf die Nerven gehen.
der Kollege @mitglied: LeReseau
Hat auf den Artikel aus diesem Forum verwiesen hier
Also habe ich diese Anleitung versucht.
Da ich auf dieses Forum sehr viel vertraue.
Hilft es wenn ich mit der Anleitung aus dem Start die selbe Arbeit mache wie vorher mit der von Kollege @148523 ?
Kann jemand auf meine Fragen antworten die ich getsellt habe.
Danke und Sorry wenn ich euch auf die Nerven gehe
Mitglied: Druckleitung
Druckleitung 03.07.2022 aktualisiert um 21:38:53 Uhr
Goto Top
wenn ich
sudo apt update
sudo apt upgrade
sudo apt install autoconf automake build-essential pkgconf libtool git libzip-dev libjpeg-dev gettext libmicrohttpd-dev libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev default-libmysqlclient-dev libpq-dev libsqlite3-dev libwebp-dev
sudo wget https://github.com/Motion-Project/motion/releases/download/release-4.4.0/$(lsb_release -cs)_motion_4.4.0-1_armhf.deb

sudo dpkg -i $(lsb_release -cs)_motion_4.4.0-1_armhf.deb
dann habe ich das motion.conf
so angepasst.
# 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 15

# 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
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..
ich bin anscheinend zu dumm
Mitglied: michi1983
michi1983 04.07.2022 um 07:38:17 Uhr
Goto Top
Zitat von @Druckleitung:
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..
ich bin anscheinend zu dumm

Nana, so voreilig wollen wir nicht sein face-wink

Dann ev. mal einen Step zurück.
Welchen RaspberryPi hast du und welches OS hast du auf die SD Karte geflashed mit welcher Methode?
Mitglied: Druckleitung
Druckleitung 04.07.2022 um 20:56:03 Uhr
Goto Top
Zitat von @michi1983:



Nana, so voreilig wollen wir nicht sein face-wink

Dann ev. mal einen Step zurück.
Welchen RaspberryPi hast du und welches OS hast du auf die SD Karte geflashed mit welcher Methode?
Also bitte hier das Model.
cat /sys/firmware/devicetree/base/model
Raspberry Pi Model B Plus Rev 1.2
Und ich schreibe die Sd Karte mit Rasberry imager siehe Bild
ras
Danke für die Hilfe
Mitglied: michi1983
michi1983 05.07.2022 um 08:50:35 Uhr
Goto Top
Okay, das ist alles exakt ident zu mir.
Was hast du denn für eine Webcam? Ist die mittels USB angeschlossen?
Mitglied: Druckleitung
Druckleitung 05.07.2022 aktualisiert um 18:17:06 Uhr
Goto Top
Zitat von @michi1983:

Okay, das ist alles exakt ident zu mir.
Was hast du denn für eine Webcam? Ist die mittels USB angeschlossen?

Ich habe es mit einer Logitech c270 probiert.
Und wie oben erwähnt konnte ich Bilder damit machen.
Danke für die Hilfe
Schaffst du es das Image der Karte bereit zu stellen? Dann probiere ich es Damitface-smile
Mitglied: michi1983
michi1983 06.07.2022 um 09:17:44 Uhr
Goto Top
Hier ist mal meine motion.conf

# 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ß
Mitglied: Druckleitung
Druckleitung 07.07.2022 aktualisiert um 20:44:46 Uhr
Goto Top
Guten Abend habe nun Deine motion.conf probiert.
Ich kann immer noch nicht mit 10.99.99.67:8081 die Webgui von motion sehen.
Folgendes sehe ich im Terminal.
Irgenwie schmiert motion ständig ab.
wie kann ich weiter debugen?
status
Wenn ich mit Htop schaue brauch motion sehr viel cpu.
Kann das ein Indiz
htop
sein?
Mitglied: michi1983
michi1983 07.07.2022 um 20:43:28 Uhr
Goto Top
Kann jetzt fast nur noch an der Hardware liegen.

Entweder der Pi oder die Webcam.
Mitglied: Druckleitung
Druckleitung 07.07.2022 aktualisiert um 20:46:46 Uhr
Goto Top
Zitat von @michi1983:

Kann jetzt fast nur noch an der Hardware liegen.

Entweder der Pi oder die Webcam.

Die Webcam ist neu.
Warum brauch motion so viel cpu?
Danke für die Hilfe
Mitglied: michi1983
michi1983 07.07.2022 um 20:48:24 Uhr
Goto Top
Wegen der über USB angeschlossenen Webcam.
Mitglied: Druckleitung
Druckleitung 07.07.2022 um 20:50:23 Uhr
Goto Top
Zitat von @michi1983:

Wegen der über USB angeschlossenen Webcam.

ist das bei Dir auch so? Hat der Pi zu wenig Rums?
Mitglied: michi1983
michi1983 07.07.2022 um 20:57:59 Uhr
Goto Top
Viel zu wenig. Das ganze Setup ist auch eigentlich nicht drauf ausgelegt einen Live Stream zu erzeugen, sondern als „Überwachungskamera“ um ein paar Snapshots zu machen.
Reine Spielerei.
Über die CSI Schnittstelle hätte man wahrscheinlich etwas mehr Glück.
Mitglied: Druckleitung
Druckleitung 07.07.2022 um 21:00:01 Uhr
Goto Top
Zitat von @michi1983:

Viel zu wenig. Das ganze Setup ist auch eigentlich nicht drauf ausgelegt einen Live Stream zu erzeugen, sondern als „Überwachungskamera“ um ein paar Snapshots zu machen.
Reine Spielerei.
Über die CSI Schnittstelle hätte man wahrscheinlich etwas mehr Glück.

Also ist das ganze nicht brauchbar?
Was für eine Kamera läuft bei Dir?

Ich dachte das ganze könnte brauchbar sein:/
Mitglied: michi1983
Lösung michi1983 07.07.2022 um 21:05:24 Uhr
Goto Top
Zitat von @Druckleitung:
Was für eine Kamera läuft bei Dir?
Eine C920

Ich dachte das ganze könnte brauchbar sein:/

Ist es bei mir auch nicht. Ruckelt natürlich - weil wie gesagt - nicht dafür ausgelegt.
Mitglied: Druckleitung
Druckleitung 07.07.2022 um 21:17:44 Uhr
Goto Top
Oje da muss ich mir was anderes suchen.
Ich brauche eine Überwachungskamera.
Schade das nie erwähnt wurde das das Projekt nichts taugt.

Danke für für Hilfe
Mitglied: michi1983
michi1983 07.07.2022 um 21:49:09 Uhr
Goto Top
Dann kauf eine Reolink.
Gerne
Mitglied: Druckleitung
Druckleitung 08.07.2022 um 20:50:02 Uhr
Goto Top
Zitat von @michi1983:

Dann kauf eine Reolink.
Gerne

Die kann ich aber nicht so montieren das Sie niemand sieht:/
Mitglied: michi1983
michi1983 08.07.2022 um 22:08:11 Uhr
Goto Top
Zitat von @Druckleitung:

Zitat von @michi1983:

Dann kauf eine Reolink.
Gerne

Die kann ich aber nicht so montieren das Sie niemand sieht:/

wenn sie jemanden abschrecken soll, ist es gut wenn man sie sieht.

wenn du was anderes vorhast, ist es creepy.
Mitglied: 148523
148523 09.07.2022 um 12:20:22 Uhr
Goto Top