Closed SumolX closed 2 years ago
Do you ever see video in the Home app? Do snapshots work?
Yes, everything is working great. I get snapshots and a video stream.... but the stream eventually stops after a few seconds in the home app.
I can see from the log the server is still streaming but the video just stops on my iPhone X and my iPad.... when this happens on my iPad it displays "No response. This camera is not responding"
Odd, looking at the logs, it seems like it thinks you closed the video feed and that’s why it shut the stream down.
I will capture a new set of logs in about an hour.
I had previously disconnected but in this log i remain connected and it would seem the stream is still being sent... but the video on my phone has stopped.
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] Video stream requested: 1280 x 720, 30 fps, 299 kbps
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] Starting video stream: native x native, native fps, 8192 kbps
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] Stream command: /homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg -f mjpeg -i http://flashforge:8080/?action=stream -an -sn -dn -codec:v libx264 -pix_fmt yuv420p -color_range mpeg -f rawvideo -preset ultrafast -tune zerolatency -b:v 8192k -payload_type 99 -ssrc 6689290 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params asdfasdfasdfasdfsdaf srtp://n.n.n.n:nnnn?rtcpport=49521&pkt_size=1316 -loglevel level+verbose -progress pipe:1
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] built with gcc 9.3.0 (Alpine 9.3.0)
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] libavutil 56. 51.100 / 56. 51.100
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] libavcodec 58. 91.100 / 58. 91.100
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] libavformat 58. 45.100 / 58. 45.100
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] libavdevice 58. 10.100 / 58. 10.100
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] libavfilter 7. 85.100 / 7. 85.100
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] libswscale 5. 7.100 / 5. 7.100
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] libswresample 3. 7.100 / 3. 7.100
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] libpostproc 55. 7.100 / 55. 7.100
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [tcp @ 0x7f49cb7d4bc0] [verbose] Starting connection attempt to n.n.n.n port nnnn
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [tcp @ 0x7f49cb7d4bc0] [verbose] Successfully connected to n.n.n.n port nnnn
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Input #0, mjpeg, from 'http://n.n.n.n:nnnn/?action=stream':
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Duration: N/A, bitrate: N/A
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Stream #0:0: Video: mjpeg (Baseline), 1 reference frame, yuvj422p(pc, bt470bg/unknown/unknown, center), 640x480 [SAR 1:1 DAR 4:3], 25 tbr, 1200k tbn, 25 tbc
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Stream mapping:
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Press [q] to stop, [?] for help
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [graph 0 input from stream 0:0 @ 0x55612b522b80] [verbose] w:640 h:480 pixfmt:yuvj422p tb:1/1200000 fr:25/1 sar:1/1
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [auto_scaler_0 @ 0x55612b524300] [verbose] w:iw h:ih flags:'bicubic' interl:0
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [format @ 0x55612b523200] [verbose] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [swscaler @ 0x55612b57d5c0] [warning] deprecated pixel format used, make sure you did set range correctly
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [auto_scaler_0 @ 0x55612b524300] [verbose] w:640 h:480 fmt:yuvj422p sar:1/1 -> w:640 h:480 fmt:yuv420p sar:1/1 flags:0x4
[5/23/2022, 9:43:28 PM] [Camera FFmpeg] [FlashForge Adventure 4] [libx264 @ 0x55612b4d2900] [info] using SAR=1/1
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [libx264 @ 0x55612b4d2900] [info] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [libx264 @ 0x55612b4d2900] [info] profile Constrained Baseline, level 3.2, 4:2:0, 8-bit
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Output #0, rtp, to 'srtp://n.n.n.n:nnnn?rtcpport=nnnn&pkt_size=1316':
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Metadata:
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] encoder : Lavf58.45.100
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Stream #0:0: Video: h264 (libx264), 1 reference frame, yuv420p(tv, center), 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 8192 kb/s, 25 fps, 90k tbn, 25 tbc
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Metadata:
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] encoder : Lavc58.91.100 libx264
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] Side data:
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] cpb: bitrate max/min/avg: 0/0/8192000 buffer size: 0 vbv_delay: N/A
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 5 fps=0.0 q=11.0 size= 278kB time=00:00:00.16 bitrate=14233.3kbits/s speed=0.263x
[5/23/2022, 9:43:29 PM] [Camera FFmpeg] [FlashForge Adventure 4] Getting the first frames took 1.16 seconds.
[5/23/2022, 9:43:30 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 8 fps=6.6 q=11.0 size= 426kB time=00:00:00.28 bitrate=12468.8kbits/s speed=0.231x
[5/23/2022, 9:43:30 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 11 fps=6.1 q=12.0 size= 561kB time=00:00:00.40 bitrate=11483.3kbits/s speed=0.221x
[5/23/2022, 9:43:31 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 14 fps=5.8 q=12.0 size= 694kB time=00:00:00.52 bitrate=10931.4kbits/s speed=0.216x
[5/23/2022, 9:43:32 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 17 fps=5.6 q=13.0 size= 820kB time=00:00:00.64 bitrate=10493.5kbits/s speed=0.212x
[5/23/2022, 9:43:32 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 20 fps=5.5 q=13.0 size= 945kB time=00:00:00.76 bitrate=10189.3kbits/s speed=0.211x
[5/23/2022, 9:43:32 PM] [Camera FFmpeg] [FlashForge Adventure 4] Received request to reconfigure: 640 x 360, 30 fps, 132 kbps (Ignored)
[5/23/2022, 9:43:33 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 23 fps=5.5 q=13.0 size= 1065kB time=00:00:00.88 bitrate=9916.3kbits/s speed=0.209x
[5/23/2022, 9:43:33 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 26 fps=5.4 q=13.0 size= 1188kB time=00:00:01.00 bitrate=9733.1kbits/s speed=0.208x
[5/23/2022, 9:43:34 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 29 fps=5.4 q=13.0 size= 1311kB time=00:00:01.12 bitrate=9590.7kbits/s speed=0.207x
[5/23/2022, 9:43:35 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 32 fps=5.3 q=13.0 size= 1431kB time=00:00:01.24 bitrate=9454.8kbits/s speed=0.206x
[5/23/2022, 9:43:35 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 35 fps=5.3 q=13.0 size= 1555kB time=00:00:01.36 bitrate=9366.5kbits/s speed=0.206x
[5/23/2022, 9:43:36 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 38 fps=5.3 q=13.0 size= 1681kB time=00:00:01.48 bitrate=9302.2kbits/s speed=0.205x
[5/23/2022, 9:43:36 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 41 fps=5.2 q=13.0 size= 1803kB time=00:00:01.60 bitrate=9232.4kbits/s speed=0.205x
[5/23/2022, 9:43:37 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 44 fps=5.2 q=13.0 size= 1926kB time=00:00:01.72 bitrate=9174.0kbits/s speed=0.204x
[5/23/2022, 9:43:38 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 47 fps=5.2 q=13.0 size= 2049kB time=00:00:01.84 bitrate=9123.5kbits/s speed=0.204x
[5/23/2022, 9:43:38 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 50 fps=5.2 q=14.0 size= 2158kB time=00:00:01.96 bitrate=9020.1kbits/s speed=0.204x
[5/23/2022, 9:43:39 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 53 fps=5.2 q=14.0 size= 2276kB time=00:00:02.08 bitrate=8965.7kbits/s speed=0.204x
[5/23/2022, 9:43:39 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 56 fps=5.2 q=13.0 size= 2400kB time=00:00:02.20 bitrate=8935.5kbits/s speed=0.203x
[5/23/2022, 9:43:40 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 59 fps=5.2 q=13.0 size= 2523kB time=00:00:02.32 bitrate=8909.1kbits/s speed=0.203x
[5/23/2022, 9:43:41 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 62 fps=5.2 q=13.0 size= 2642kB time=00:00:02.44 bitrate=8870.8kbits/s speed=0.203x
[5/23/2022, 9:43:41 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 65 fps=5.2 q=13.0 size= 2765kB time=00:00:02.56 bitrate=8848.9kbits/s speed=0.203x
[5/23/2022, 9:43:42 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 68 fps=5.1 q=13.0 size= 2890kB time=00:00:02.68 bitrate=8834.0kbits/s speed=0.203x
[5/23/2022, 9:43:42 PM] [Camera FFmpeg] [FlashForge Adventure 4] [info] frame= 71 fps=5.1 q=13.0 size= 3004kB time=00:00:02.80 bitrate=8787.7kbits/s speed=0.203x
Can you try either a lower bitrate or removing forceMax and see if it behaves any better?
I tried lowering the bitrate with and without forceMax and saw no difference.
{
"name": "FlashForge Adventure 4",
"manufacturer": "FlashForge",
"model": "FlashForge Adventure 4",
"unbridge": true,
"videoConfig": {
"source": "-f mjpeg -i http://n.n.n.n:nnnn/?action=stream",
"maxBitrate": 768,
"audio": false,
"debug": true
}
}
Just adding this tidbit of information as it maybe related depending on the version of ffmpeg is distributed with this plugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have similar issue.
Describe The Problem: I am able to establish a live stream with raw tcp mjpeg source, however after a few seconds the stream stops.
To Reproduce: I use the -f mjpeg option which allows me to establish a direct connection to the camera stream. I've attached my configuration below.
Logs:
Homebridge Config:
Environment:
Node.js Version: v14.17.4 Homebridge Version: 1.4.1 Homebridge Camera FFmpeg Version: 3.1.4 Homebridge Config UI X Plugin Version: v4.45.0 Operating System: Alpine Linux (3.12.7)