Closed TheRealGreatOldOne closed 5 years ago
OK, another day, another attempt.
Ditch everything - AGAIN!: FFMpeg uninstalled Foscamcamera uninstalled Camera-ffmpeg uninstalled Camera-ffmpeg-omx uninstalled
Check everything else is upto date: sudo apt update - everything upto date
Reinstall everything: sudo apt install ffmpeg sudo npm install -g homebridge sudo npm install -g homebridge-foscamcamera
Ensure that users have access to the video group and reboot: sudo usermod -aG video pi sudo usermod -aG video homebridge sudo reboot
Nuked everything in the persist directory, removed home bridge from the home app, along with the camera. Rebooted again. And for grins and giggles, I restarted my network (Google mesh wifi), and the camera.
Started home bridge again, re-added to the home app using the QR code. then added the camera
Snapshot works as do the motion and alarm sensors. Clicking on the video and I got a stream! Yes - brilliant. Here's the debug output showing what it was doing:
[2018-9-26 10:32:30] Homebridge is running on port 51826. [2018-9-26 10:32:31] [Foscam] Initializing platform accessory 'Foscam C1'... [2018-9-26 10:32:31] Foscam C1 is running on port 41059. [2018-9-26 10:32:31] [Foscam] C1 is armed (stay). [2018-9-26 10:32:36] [Foscam] C1 is armed (stay). [2018-9-26 10:32:37] [Foscam] Snapshot from C1 at 480x270 ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 - [2018-9-26 10:32:41] [Foscam] Start streaming video from C1 with 1280x720@299kBit ffmpeg -re -i rtsp://gooadmin:thx1138@10.88.96.36:554/videoMain -map 0:0 -vcodec h264_omx -pix_fmt yuv420p -r 15 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -payload_type 99 -ssrc 1032362 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params 7QZ3D3FN6l473WZu3ClGwWn1eC8X1zxquKnqweAe srtp://10.88.96.7:50179?rtcpport=50179&localrtcpport=50179&pkt_size=1316 ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516 configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --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-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
libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://gooadmin:thx1138@10.88.96.36:554/videoMain': Metadata: title : videoMain Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720, 15 tbr, 90k tbn, 180k tbc Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Codec AVOption tune (Tune the encoding to a specific scenario) specified for output file #0 (srtp://10.88.96.7:50179?rtcpport=50179&localrtcpport=50179&pkt_size=1316) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[swscaler @ 0x1e9ce20] deprecated pixel format used, make sure you did set range correctly
[h264_omx @ 0x1ded9f0] Using OMX.broadcom.video_encode
Output #0, rtp, to 'srtp://10.88.96.7:50179?rtcpport=50179&localrtcpport=50179&pkt_size=1316': Metadata: title : videoMain
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (h264_omx), yuv420p, 1280x720, q=2-31, 299 kb/s, 15 fps, 90k tbn, 15 tbc
Metadata:
encoder : Lavc57.64.101 h264_omx
Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_omx)) Press [q] to stop, [?] for help
frame= 8 fps=0.0 q=-0.0 size= 20kB time=00:00:00.40 bitrate= 415.5kbits/s speed=0.768x
frame= 20 fps= 19 q=-0.0 size= 52kB time=00:00:01.20 bitrate= 353.4kbits/s speed=1.13x
frame= 33 fps= 21 q=-0.0 size= 86kB time=00:00:02.06 bitrate= 342.3kbits/s speed=1.29x
frame= 45 fps= 21 q=-0.0 size= 118kB time=00:00:02.86 bitrate= 337.5kbits/s speed=1.33x
frame= 56 fps= 21 q=-0.0 size= 151kB time=00:00:03.60 bitrate= 343.5kbits/s speed=1.36x
[rtsp @ 0x1d8c730] max delay reached. need to consume packet
[rtsp @ 0x1d8c730] RTP: missed 40 packets
[h264 @ 0x1ebf720] concealing 1783 DC, 1783 AC, 1783 MV errors in I frame
[h264 @ 0x1eb67d0] Increasing reorder buffer to 1
frame= 61 fps= 19 q=-0.0 size= 155kB time=00:00:03.93 bitrate= 323.0kbits/s speed=1.25x
frame= 61 fps= 17 q=-0.0 size= 155kB time=00:00:03.93 bitrate= 323.0kbits/s speed=1.07x
frame= 61 fps= 15 q=-0.0 size= 155kB time=00:00:03.93 bitrate= 323.0kbits/s speed=0.944x
frame= 68 fps= 14 q=-0.0 size= 189kB time=00:00:04.33 bitrate= 356.7kbits/s dup=4 drop=0 speed=0.923x
frame= 78 fps= 15 q=-0.0 size= 224kB time=00:00:05.00 bitrate= 367.2kbits/s dup=4 drop=0 speed=0.962x
frame= 90 fps= 16 q=-0.0 size= 261kB time=00:00:05.80 bitrate= 368.7kbits/s dup=4 drop=0 speed=1.01x
frame= 102 fps= 16 q=-0.0 size= 303kB time=00:00:06.60 bitrate= 375.6kbits/s dup=4 drop=0 speed=1.05x
frame= 114 fps= 17 q=-0.0 size= 347kB time=00:00:07.40 bitrate= 383.8kbits/s dup=4 drop=0 speed=1.09x
[rtsp @ 0x1d8c730] max delay reached. need to consume packet
[rtsp @ 0x1d8c730] RTP: missed 50 packets
[h264 @ 0x1eb67d0] error while decoding MB 48 12, bytestream -43
[h264 @ 0x1eb67d0] concealing 2641 DC, 2641 AC, 2641 MV errors in I frame
frame= 124 fps= 17 q=-0.0 size= 390kB time=00:00:08.06 bitrate= 396.5kbits/s dup=6 drop=0 speed= 1.1x
frame= 136 fps= 17 q=-0.0 size= 440kB time=00:00:08.86 bitrate= 406.4kbits/s dup=6 drop=0 speed=1.13x
frame= 148 fps= 18 q=-0.0 size= 492kB time=00:00:09.66 bitrate= 416.7kbits/s dup=6 drop=0 speed=1.16x
frame= 156 fps= 18 q=-0.0 size= 496kB time=00:00:10.20 bitrate= 398.4kbits/s dup=6 drop=0 speed=1.15x
frame= 164 fps= 17 q=-0.0 size= 546kB time=00:00:10.73 bitrate= 417.0kbits/s dup=6 drop=0 speed=1.14x
frame= 172 fps= 17 q=-0.0 size= 590kB time=00:00:11.26 bitrate= 428.7kbits/s dup=6 drop=0 speed=1.13x
frame= 180 fps= 17 q=-0.0 size= 594kB time=00:00:11.80 bitrate= 412.6kbits/s dup=6 drop=0 speed=1.13x
[2018-9-26 10:32:55] [Foscam] C1 Motion Detected!
frame= 188 fps= 17 q=-0.0 size= 638kB time=00:00:12.33 bitrate= 423.5kbits/s dup=6 drop=0 speed=1.12x
frame= 196 fps= 17 q=-0.0 size= 678kB time=00:00:12.86 bitrate= 431.7kbits/s dup=6 drop=0 speed=1.12x
frame= 204 fps= 17 q=-0.0 size= 682kB time=00:00:13.40 bitrate= 416.9kbits/s dup=6 drop=0 speed=1.11x
frame= 212 fps= 17 q=-0.0 size= 725kB time=00:00:13.93 bitrate= 426.4kbits/s dup=6 drop=0 speed=1.11x
frame= 220 fps= 17 q=-0.0 size= 769kB time=00:00:14.46 bitrate= 435.3kbits/s dup=6 drop=0 speed= 1.1x
frame= 228 fps= 17 q=-0.0 size= 773kB time=00:00:15.00 bitrate= 422.3kbits/s dup=6 drop=0 speed= 1.1x
[rtsp @ 0x1d8c730] max delay reached. need to consume packet
[rtsp @ 0x1d8c730] RTP: missed 3 packets
frame= 236 fps= 17 q=-0.0 size= 819kB time=00:00:15.53 bitrate= 431.7kbits/s dup=6 drop=0 speed=1.09x
[h264 @ 0x1f10e80]
error while decoding MB 20 43, bytestream -20
[h264 @ 0x1f10e80] concealing 189 DC, 189 AC, 189 MV errors in I frame
frame= 244 fps= 17 q=-0.0 size= 863kB time=00:00:16.06 bitrate= 439.8kbits/s dup=6 drop=0 speed=1.09x
frame= 252 fps= 17 q=-0.0 size= 868kB time=00:00:16.60 bitrate= 428.5kbits/s dup=6 drop=0 speed=1.09x
frame= 260 fps= 16 q=-0.0 size= 916kB time=00:00:17.13 bitrate= 437.8kbits/s dup=6 drop=0 speed=1.08x
frame= 268 fps= 16 q=-0.0 size= 962kB time=00:00:17.66 bitrate= 446.1kbits/s dup=6 drop=0 speed=1.08x
frame= 276 fps= 16 q=-0.0 size= 968kB time=00:00:18.20 bitrate= 435.8kbits/s dup=6 drop=0 speed=1.08x
frame= 285 fps= 16 q=-0.0 size= 1017kB time=00:00:18.80 bitrate= 443.0kbits/s dup=6 drop=0 speed=1.08x
frame= 292 fps= 16 q=-0.0 size= 1066kB time=00:00:19.26 bitrate= 453.1kbits/s dup=6 drop=0 speed=1.07x
[rtsp @ 0x1d8c730] max delay reached. need to consume packet
[rtsp @ 0x1d8c730] RTP: missed 9 packets
[h264 @ 0x1f10e80] error while decoding MB 56 38, bytestream -25
[h264 @ 0x1f10e80] concealing 553 DC, 553 AC, 553 MV errors in I frame
frame= 300 fps= 16 q=-0.0 size= 1068kB time=00:00:19.80 bitrate= 441.9kbits/s dup=6 drop=0 speed=1.07x
frame= 308 fps= 16 q=-0.0 size= 1117kB time=00:00:20.33 bitrate= 450.2kbits/s dup=6 drop=0 speed=1.07x
frame= 316 fps= 16 q=-0.0 size= 1170kB time=00:00:20.86 bitrate= 459.3kbits/s dup=6 drop=0 speed=1.07x
frame= 324 fps= 16 q=-0.0 size= 1172kB time=00:00:21.40 bitrate= 448.7kbits/s dup=6 drop=0 speed=1.07x
frame= 332 fps= 16 q=-0.0 size= 1225kB time=00:00:21.93 bitrate= 457.5kbits/s dup=6 drop=0 speed=1.06x
frame= 340 fps= 16 q=-0.0 size= 1275kB time=00:00:22.46 bitrate= 465.0kbits/s dup=6 drop=0 speed=1.06x
frame= 348 fps= 16 q=-0.0 size= 1280kB time=00:00:23.00 bitrate= 456.0kbits/s dup=6 drop=0 speed=1.06x
[rtsp @ 0x1d8c730] max delay reached. need to consume packet
[rtsp @ 0x1d8c730] RTP: missed 2 packets
frame= 356 fps= 16 q=-0.0 size= 1330kB time=00:00:23.53 bitrate= 463.0kbits/s dup=6 drop=0 speed=1.06x
[h264 @ 0x1f10e80] error while decoding MB 43 43, bytestream -15
[h264 @ 0x1f10e80] concealing 166 DC, 166 AC, 166 MV errors in I frame
frame= 364 fps= 16 q=-0.0 size= 1381kB time=00:00:24.06 bitrate= 470.2kbits/s dup=6 drop=0 speed=1.06x
frame= 372 fps= 16 q=-0.0 size= 1386kB time=00:00:24.60 bitrate= 461.5kbits/s dup=6 drop=0 speed=1.06x
frame= 380 fps= 16 q=-0.0 size= 1439kB time=00:00:25.13 bitrate= 469.0kbits/s dup=6 drop=0 speed=1.06x
frame= 388 fps= 16 q=-0.0 size= 1492kB time=00:00:25.66 bitrate= 476.2kbits/s dup=6 drop=0 speed=1.06x
frame= 396 fps= 16 q=-0.0 size= 1496kB time=00:00:26.20 bitrate= 467.7kbits/s dup=6 drop=0 speed=1.05x
frame= 404 fps= 16 q=-0.0 size= 1550kB time=00:00:26.73 bitrate= 475.0kbits/s dup=6 drop=0 speed=1.05x
frame= 412 fps= 16 q=-0.0 size= 1603kB time=00:00:27.26 bitrate= 481.7kbits/s dup=6 drop=0 speed=1.05x
[rtsp @ 0x1d8c730] max delay reached. need to consume packet
[rtsp @ 0x1d8c730] RTP: missed 14 packets
[h264 @ 0x1f10e80] error while decoding MB 52 36, bytestream -31
[h264 @ 0x1f10e80] concealing 717 DC, 717 AC, 717 MV errors in I frame
frame= 418 fps= 16 q=-0.0 size= 1605kB time=00:00:27.66 bitrate= 475.2kbits/s dup=6 drop=0 speed=1.04x
frame= 429 fps= 16 q=-0.0 size= 1659kB time=00:00:28.40 bitrate= 478.6kbits/s dup=7 drop=0 speed=1.05x
frame= 437 fps= 16 q=-0.0 size= 1710kB time=00:00:28.93 bitrate= 484.1kbits/s dup=7 drop=0 speed=1.05x
frame= 445 fps= 16 q=-0.0 size= 1712kB time=00:00:29.46 bitrate= 475.9kbits/s dup=7 drop=0 speed=1.05x
frame= 453 fps= 16 q=-0.0 size= 1765kB time=00:00:30.00 bitrate= 482.0kbits/s dup=7 drop=0 speed=1.05x
frame= 461 fps= 16 q=-0.0 size= 1816kB time=00:00:30.53 bitrate= 487.2kbits/s dup=7 drop=0 speed=1.05x
frame= 469 fps= 16 q=-0.0 size= 1821kB time=00:00:31.06 bitrate= 480.1kbits/s dup=7 drop=0 speed=1.05x
frame= 477 fps= 16 q=-0.0 size= 1872kB time=00:00:31.60 bitrate= 485.4kbits/s dup=7 drop=0 speed=1.04x
frame= 485 fps= 16 q=-0.0 size= 1922kB time=00:00:32.13 bitrate= 490.0kbits/s dup=7 drop=0 speed=1.04x
frame= 493 fps= 16 q=-0.0 size= 1927kB time=00:00:32.66 bitrate= 483.1kbits/s dup=7 drop=0 speed=1.04x
frame= 501 fps= 16 q=-0.0 size= 1977kB time=00:00:33.20 bitrate= 487.8kbits/s dup=7 drop=0 speed=1.04x
frame= 509 fps= 16 q=-0.0 size= 2027kB time=00:00:33.73 bitrate= 492.3kbits/s dup=7 drop=0 speed=1.04x
frame= 517 fps= 16 q=-0.0 size= 2034kB time=00:00:34.26 bitrate= 486.2kbits/s dup=7 drop=0 speed=1.04x
frame= 526 fps= 16 q=-0.0 size= 2087kB time=00:00:34.86 bitrate= 490.2kbits/s dup=7 drop=0 speed=1.04x
frame= 529 fps= 16 q=-0.0 Lsize= 2138kB time=00:00:35.20 bitrate= 497.6kbits/s dup=7 drop=0 speed=1.04x
video:2113kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.172727%
Exiting normally, received signal 15.
[2018-9-26 10:33:18] [Foscam] Stopped streaming
But then that's the only time it's work. Subsequent attempts to click on the camera in home give me nothing again, and the debug output looks like this:
[2018-9-26 10:33:27] [Foscam] Start streaming video from C1 with 1280x720@299kBit ffmpeg -re -i rtsp://gooadmin:thx1138@10.88.96.36:554/videoMain -map 0:0 -vcodec h264_omx -pix_fmt yuv420p -r 15 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -payload_type 99 -ssrc 11710215 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params sc1Ui1SCbJg7k7vOUhYZHtPBBES31TsiJ7JS1yI5 srtp://10.88.96.7:50310?rtcpport=50310&localrtcpport=50310&pkt_size=1316 ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516 configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --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-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
libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://gooadmin:thx1138@10.88.96.36:554/videoMain': Metadata: title : videoMain Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720, 14.99 tbr, 90k tbn, 180k tbc Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Codec AVOption tune (Tune the encoding to a specific scenario) specified for output file #0 (srtp://10.88.96.7:50310?rtcpport=50310&localrtcpport=50310&pkt_size=1316) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[swscaler @ 0x2336830] deprecated pixel format used, make sure you did set range correctly
[h264_omx @ 0x229a0e0] Using OMX.broadcom.video_encode
Output #0, rtp, to 'srtp://10.88.96.7:50310?rtcpport=50310&localrtcpport=50310&pkt_size=1316': Metadata: title : videoMain
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (h264_omx), yuv420p, 1280x720, q=2-31, 299 kb/s, 15 fps, 90k tbn, 15 tbc
Metadata:
encoder : Lavc57.64.101 h264_omx
Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_omx)) Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
[2018-9-26 10:33:44] [Foscam] C1 Motion Detected!
[2018-9-26 10:33:44] [Foscam] Snapshot from C1 at 480x270
ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 -
[2018-9-26 10:33:44] [Foscam] Snapshot from C1 at 480x270
ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 -
[2018-9-26 10:33:44] [Foscam] Snapshot from C1 at 480x270
ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 -
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
[2018-9-26 10:33:45] [Foscam] Snapshot from C1 at 480x270
ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 -
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
[2018-9-26 10:33:49] [Foscam] C1 Motion Detected!
[2018-9-26 10:33:49] [Foscam] Snapshot from C1 at 480x270
ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 -
[2018-9-26 10:33:49] [Foscam] Snapshot from C1 at 480x270
ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 -
[2018-9-26 10:33:49] [Foscam] Snapshot from C1 at 480x270
ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 -
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=-0.0 Lsize= 0kB time=00:00:00.00 bitrate=46545.5kbits/s speed=6.28e-07x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 137.037033%
Exiting normally, received signal 15.
[2018-9-26 10:33:50] [Foscam] Stopped streaming
Nothing is coming from the camera. all the frames are empty. ARRRRRRRGH!!!
I know this works. I've seen it with my own eyes. But it only appears to work once. So I know I've got what needs to be in place... just ffmpeg, home bridge and the new foscam plugin.
My question now is - Do I need to look at settings on the camera? There's the config webpage you can get @ ipaddr:88, which has a bunch of settings. And RSTP is setup with RSTP on 554 and ONVIF on 888. Should UPnP and P2P be on? Should I leave the DHCP setting on (as I have the IP reserved on the router for it), or force it in the camera setup? Should there be something set on the router, besides reserving that IP Address?
I'll be bald by the time I get this working.... :)
Finally - this is all i've got in the config.json file { "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154"
},
"description": "DeatStar Config",
"accessories": [],
"platforms":
[
{
"platform": "FoscamCamera",
"name": "Foscam",
"cameras":
[
{
"username": "gooadmin",
"password": "thx1138",
"host": "10.88.96.36",
"port": 88,
"stay": 13,
"away": 15,
"night": 14,
"armPreset": "Start",
"disarmPreset": "LeftMost",
"sensitivity": 2,
"triggerInterval": 5,
"videoConfig":
{
"source": "-re -i rtsp://gooadmin:thx1138@10.88.96.36:554/videoMain",
"stillImageSource": "-i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138&",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"vcodec": "h264_omx",
"maxFPS": 15,
"debug": true
}
}
]
}
]
}
Well, thats it. I'm calling it - I've wasted way too much of my time on this. I've even tried installing home bridge on my Mac, and running foscam from there - but it still does not work. the C1 camera sucks.
Starting an Amazon return on them, and good riddance.
Did you managed to get it working @TheRealGreatOldOne ?
@Shinodas - no, I did not. I returned the cameras, and bought some from EZVIZ. These work perfectly with the standard camera plugin for homebridge
Can someone please help?
The camera streams fine via VLC, on the following address RTSP://usr:pwd@xx.xx.xx.xx:554/videoMain
I've completely torn down the home bridge server, and rebuilt. Raspbian stretch lite, latest file from pi.org (27/06/2018)
ffmpeg: ffmpeg version N-81800-gf013ba4 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.9.2 (Raspbian 4.9.2-10) configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-omx --enable-omx-rpi libavutil 55. 30.100 / 55. 30.100 libavcodec 57. 58.103 / 57. 58.103 libavformat 57. 51.100 / 57. 51.100 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 63.100 / 6. 63.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 2.100 / 2. 2.100 libpostproc 54. 0.100 / 54. 0.100
gcc: version 6.3.0 20170516 (Raspbian 6.3.0-18+rpi1+deb9u1) node -v : v8.12.0 libavahi-compat-libdnssd-dev is already the newest version (0.6.32-2).
Homebridge: installed from latest NPM /usr/bin/homebridge -> /usr/lib/node_modules/homebridge/bin/homebridge
I then grab then foscam NPM, install it and use the config.json from luisiam/homebridge-foscamcamera to add my camera:
that's the only thing in the config bar bridge info at the top. home bridge starts fine, and I can add the bridge in the home app, and then the camera itself. it starts taking snapshots fine, and the sensors work as expected:
[2018-9-25 18:55:09] Homebridge is running on port 51826. [2018-9-25 18:55:11] [Foscam] Initializing platform accessory 'Foscam C1'... [2018-9-25 18:55:11] Foscam C1 is running on port 35519. [2018-9-25 18:55:12] [Foscam] C1 is armed (stay). [2018-9-25 18:55:45] [Foscam] C1 is armed (stay). [2018-9-25 18:55:46] [Foscam] Snapshot from C1 at 480x270 ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 - [2018-9-25 18:55:58] [Foscam] Snapshot from C1 at 480x270 ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 - [2018-9-25 18:56:09] [Foscam] Snapshot from C1 at 480x270 ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 - [2018-9-25 18:56:11] [Foscam] C1 Motion Detected! [2018-9-25 18:56:11] [Foscam] Snapshot from C1 at 480x270 ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 - [2018-9-25 18:56:11] [Foscam] Snapshot from C1 at 480x270 ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 - [2018-9-25 18:56:11] [Foscam] Snapshot from C1 at 480x270 ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 - [2018-9-25 18:56:16] [Foscam] C1 Motion Detected! [2018-9-25 18:56:16] [Foscam] Snapshot from C1 at 480x270 ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 - [2018-9-25 18:56:17] [Foscam] Snapshot from C1 at 480x270 ffmpeg -i http://gooadmin:thx1138@10.88.96.36:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=gooadmin&pwd=thx1138& -t 1 -s 480x270 -f image2 -
But as soon as you click on the camera to see the feed, I get a static image and this on the ssh session to the pi:
[2018-9-25 18:57:10] [Foscam] Start streaming video from C1 with 1280x720@299kBit ffmpeg -rtsp_transport tcp -re -i rtsp://gooadmin:thx1138@10.88.96.36:554/videoMain -map 0:0 -vcodec libx264 -pix_fmt yuv420p -r 15 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -payload_type 99 -ssrc 233507 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params vMIlAtMkc7YnZ0havVEjD5TgJ31HgjoklYA0N4ge srtp://10.88.96.7:55757?rtcpport=55757&localrtcpport=55757&pkt_size=1316 ffmpeg version N-81800-gf013ba4 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.9.2 (Raspbian 4.9.2-10) configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-omx --enable-omx-rpi libavutil 55. 30.100 / 55. 30.100 libavcodec 57. 58.103 / 57. 58.103 libavformat 57. 51.100 / 57. 51.100 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 63.100 / 6. 63.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 2.100 / 2. 2.100 libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.1 : mono Input #0, rtsp, from 'rtsp://gooadmin:thx1138@10.88.96.36:554/videoMain': Metadata:
Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709), 1280x720, 50 tbr, 90k tbn, 180k tbc Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
[swscaler @ 0x18849e0] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x1851f90] VBV maxrate unspecified, assuming CBR
[libx264 @ 0x1851f90] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x1851f90] profile High, level 3.1
Output #0, rtp, to 'srtp://10.88.96.7:55757?rtcpport=55757&localrtcpport=55757&pkt_size=1316': Metadata: title : videoMain encoder : Lavf57.51.100 Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720, q=-1--1, 299 kb/s, 15 fps, 90k tbn, 15 tbc Metadata: encoder : Lavc57.58.103 libx264 Side data: cpb: bitrate max/min/avg: 0/0/299000 buffer size: 299000 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Exiting normally, received signal 15.
[2018-9-25 18:57:40] [Foscam] Stopped streaming
Nothing appears to be being sent....
What am I doing wrong here? Do I need:
To have the https://github.com/KhaosT/homebridge-camera-ffmpeg module installed? And does it need to be registered as a platform with some configuration? If so, what? What about the special version of camera ffmpeg with OMX? (https://github.com/legotheboss/homebridge-camera-ffmpeg-omx) - same questions as the noramal - does it need to be installed? settings in the config.json file?
Im only running this as the pi user at the moment whilst i troubleshoot (ha! :-D) - and I've made sure that this user is a member of the video group.
HELP! :/