brutella / hkcam

Open-Source HomeKit Surveillance Camera
https://hochgatterer.me/hkcam/
Apache License 2.0
925 stars 141 forks source link

no video fresh install #19

Open sashkab opened 5 years ago

sashkab commented 5 years ago

Just installed 0.0.7 manually and ran ansinble playbook. Was able to add camera into Home app, but it shows no video. From logs it seems that Pi Zero W fails to do something..

2019-06-01_02:52:26.47151 DEBUG 2019/06/01 03:52:26 resource.go:43: IPADDRESS:61447 POST /resource
2019-06-01_02:52:28.39989 ffmpeg version 3.2.14-1~deb9u1+rpt1 Copyright (c) 2000-2019 the FFmpeg developers
2019-06-01_02:52:28.40043   built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
2019-06-01_02:52:28.40070   configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
2019-06-01_02:52:28.40166   libavutil      55. 34.101 / 55. 34.101
2019-06-01_02:52:28.40785   libavcodec     57. 64.101 / 57. 64.101
2019-06-01_02:52:28.40813   libavformat    57. 56.101 / 57. 56.101
2019-06-01_02:52:28.40833   libavdevice    57.  1.100 / 57.  1.100
2019-06-01_02:52:28.40854   libavfilter     6. 65.100 /  6. 65.100
2019-06-01_02:52:28.40873   libavresample   3.  1.  0 /  3.  1.  0
2019-06-01_02:52:28.40893   libswscale      4.  2.100 /  4.  2.100
2019-06-01_02:52:28.40923   libswresample   2.  3.100 /  2.  3.100
2019-06-01_02:52:28.40943   libpostproc    54.  1.100 / 54.  1.100
2019-06-01_02:52:29.19775 Input #0, video4linux2,v4l2, from '/dev/video0':
2019-06-01_02:52:29.19788   Duration: N/A, start: 68.484604, bitrate: 283115 kb/s
2019-06-01_02:52:29.19792     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1024x768, 283115 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
2019-06-01_02:52:29.20131 Output #0, v4l2, to '/dev/video1':
2019-06-01_02:52:29.20784   Metadata:
2019-06-01_02:52:29.20811     encoder         : Lavf57.56.101
2019-06-01_02:52:29.20900     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1024x768, q=2-31, 283115 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
2019-06-01_02:52:29.21008 Stream mapping:
2019-06-01_02:52:29.21028   Stream #0:0 -> #0:0 (copy)
2019-06-01_02:52:29.21066 Press [q] to stop, [?] for help
2019-06-01_02:52:29.72041 frame=    3 fps=0.0 q=-1.0 size=N/A time=00:00:00.42 bitrate=N/A speed=0.836x    ^MDEBUG 2019/06/01 03:52:29 ffmpeg.go:186: Stopping loopback
2019-06-01_02:52:29.78914 INFO 2019/06/01 03:52:29 resource.go:45: r.imgFn() signal: bus error
2019-06-01_02:52:29.79907 frame=    3 fps=0.0 q=-1.0 Lsize=N/A time=00:00:00.42 bitrate=N/A speed=0.723x
2019-06-01_02:52:29.79940 video:3456kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
2019-06-01_02:52:29.91517 Exiting normally, received signal 2.

What am I doing wrong?

sashkab commented 5 years ago

Is it possible that latest ansible playbook installed version 0.0.6? It's what I see in firmware.

What's the procedure to upgrade to the latest version?

sashkab commented 5 years ago

Upgraded to latest version (ie. master) using these instructions — https://github.com/brutella/hkcam/issues/11#issuecomment-497054087

Same — sometimes pi zero freezes...

It's been working 100+ days using homebridge with pi camera until today without issues.

brutella commented 5 years ago

Please compile and install the commit 3a825f0 as described here.

sashkab commented 5 years ago

Yes, it's exactly commit I upgraded to.

brutella commented 5 years ago

I see a bus error in the logs.

2019-06-01_02:52:29.78914 INFO 2019/06/01 03:52:29 resource.go:45: r.imgFn() signal: bus error

Not sure why this happens, but I also once had a RPi Zero which freezed after some minutes. Maybe the problem is a broken SD card?

sashkab commented 5 years ago

Maybe the problem is a broken SD card?

Looks like not sd card — replaced with new one — same issue. freezing with similar log messages. Installed latest master 44443438a2a9c0292f106afa7b801c22223d4875.