acobaugh / shinobi-docker

A custom docker build for Shinobi
19 stars 13 forks source link

Motion detection is not working #7

Open CurlyFlow opened 4 years ago

CurlyFlow commented 4 years ago

Hi there, and thanks for your docker. The dev from shinobi dont like docker, so he is not maintaining it (it seems). Great to see other people making it better!

Overall the docker works im currently using migoller/shinobidocker:alpine but i have some problems.

1.) /config directory is empty 2.) motion detection is not working, might have something to do with

at PolygonPoints._checkVertexes (/opt/shinobi/node_modules/polygon-points/index.js:34:23) at new PolygonPoints (/opt/shinobi/node_modules/polygon-points/index.js:6:14) at PamDiff._processRegions (/opt/shinobi/node_modules/pam-diff/index.js:272:28) at PamDiff._parseFirstChunk (/opt/shinobi/node_modules/pam-diff/index.js:397:14) at PamDiff._transform (/opt/shinobi/node_modules/pam-diff/index.js:409:14) at PamDiff.Transform._read (_stream_transform.js:186:10) at PamDiff.Transform._write (_stream_transform.js:174:12) at doWrite (_stream_writable.js:396:12) at writeOrBuffer (_stream_writable.js:382:5) at PamDiff.Writable.write (_stream_writable.js:290:11) at Pipe2Pam.ondata (_stream_readable.js:639:20) at emitOne (events.js:116:13) at Pipe2Pam.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Pipe2Pam.Readable.push (_stream_readable.js:208:10) Error: Each vertex of the polygon must consist of an object with an x and y unsigned integer.

this error. (its from the docker log) What i mean with not working? I have 2 cameras enabled, working fine, but as soon as i enable motion detection i get the following error in the app:

Kameras : Parkplatz FFMPEG STDERR a few seconds ago [mp4 @ 0x5611081330c0] pts has no value Kameras : Parkplatz FFMPEG STDERR a few seconds ago [segment @ 0x14eab650d680] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [mp4 @ 0x5611082b1340] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [mp4 @ 0x5611082b1340] pts has no value [mp4 @ 0x5611081330c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly Kameras : Parkplatz FFMPEG STDERR a few seconds ago [rtsp @ 0x14eab6f60740] Stream #0: not enough frames to estimate rate; consider increasing probesize Kameras : Parkplatz Process Started a few seconds ago cmd : -loglevel warning -r 30 -progress pipe:5 -analyzeduration 100000 -probesize 100000 -fflags +igndts -rtsp_transport tcp -i "rtsp://user:pw@192.168.86.53:1338/11/" -an -segment_format_options movflags=faststart+frag_keyframe+empty_moov -strict -2 -threads 1 -vcodec copy -f segment -segment_atclocktime 1 -reset_timestamps 1 -strftime 1 -segment_list pipe:2 -segment_time 900 "/opt/shinobi/videos/Kameras/Parkplatz/%Y-%m-%dT%H-%M-%S.mp4" -f mp4 -an -c:v copy -strict -2 -movflags +frag_keyframe+empty_moov+default_base_moof -metadata title="Poseidon Stream" -reset_timestamps 1 pipe:1 -r 2 -s 320x240 -an -c:v pam -pix_fmt gray -f image2pipe pipe:3

and the screen turns black. I did every setting (as far as i know) like descriped in the docs. Turning motion detection off, makes the camera appear again.

3.) if i go to regions, i just see a orange box, instead of the camera (even if motion detection is off)

4.) would it be possible to have videos sorted by day (not important)?

5.) It seems like hardware accelation is not working. Ive set device /dev/dri to the container (for intel quick sync, but the app doesnt seem to use it)

e.g.

[AVHWDeviceContext @ 0x147beb6eff80] Failed to initialise VAAPI connection: -1 (unknown libva error).

or

[AVHWDeviceContext @ 0x147becd56f80] Cannot open the X11 display . Device creation failed: -1313558101.

or

[mp4 @ 0x147becf975c0] pts has no value

6.) Why is there a "test" db in the mysql? Is this really needed? Can probably be removed?

Edit: ive testet abit around.

It seems like the camera turns black (and the errors appear)

Kameras : Parkplatz Process Unexpected Exit a few seconds ago msg : Process Crashed for Monitor cmd : -loglevel warning -r 30 -progress pipe:5 -analyzeduration 100000 -probesize 100000 -fflags +igndts -rtsp_transport tcp -i "rtsp://user:pw@192.168.86.53:1338/11/" -f mp4 -an -c:v copy -strict -2 -movflags +frag_keyframe+empty_moov+default_base_moof -metadata title="Poseidon Stream" -reset_timestamps 1 pipe:1 -r 2 -s 640x480 -an -c:v pam -pix_fmt gray -f image2pipe pipe:3 -an -c:v copy -f hls -tune zerolatency -g 1 -hls_time 2 -hls_list_size 10 -start_number 0 -live_start_index -3 -hls_allow_cache 0 -hls_flags +delete_segments+omit_endlist "/dev/shm/streams/Kameras/Parkplatz/detectorStream.m3u8" Kameras : Parkplatz FFMPEG STDERR a few seconds ago Finishing stream 1:0 without any data written to it. Kameras : Parkplatz FFMPEG STDERR a few seconds ago [mp4 @ 0x1460604cb5c0] pts has no value Kameras : Parkplatz FFMPEG STDERR a few seconds ago [mp4 @ 0x1460604cb5c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly Kameras : Parkplatz FFMPEG STDERR a few seconds ago [rtsp @ 0x14605f3a3640] Stream #0: not enough frames to estimate rate; consider increasing probesize Kameras : Parkplatz Process Started a few seconds ago cmd : -loglevel warning -r 30 -progress pipe:5 -analyzeduration 100000 -probesize 100000 -fflags +igndts -rtsp_transport tcp -i "rtsp://user:pw@192.168.86.53:1338/11/" -f mp4 -an -c:v copy -strict -2 -movflags +frag_keyframe+empty_moov+default_base_moof -metadata title="Poseidon Stream" -reset_timestamps 1 pipe:1 -r 2 -s 640x480 -an -c:v pam -pix_fmt gray -f image2pipe pipe:3 -an -c:v copy -f hls -tune zerolatency -g 1 -hls_time 2 -hls_list_size 10 -start_number 0 -live_start_index -3 -hls_allow_cache 0 -hls_flags +delete_segments+omit_endlist "/dev/shm/streams/Kameras/Parkplatz/detectorStream.m3u8"

as soon as i enable "Trigger Record This will order the camera to record if it is set to "Watch-Only" when a motion even is detected." without this option, it works (but ofc, it doesnt record when motion happens) anyway i also cant see "Show Matrices Outline which pixels are detected as changed in one matrix." doesnt matter what i set anything to.

If you want, you can teamviewer over it?

Thanks!