Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshots working but not live video #711

Closed
cat2devnull opened this issue Aug 4, 2020 · 19 comments
Closed

Snapshots working but not live video #711

cat2devnull opened this issue Aug 4, 2020 · 19 comments
Labels

Comments

@cat2devnull
Copy link

Describe The Problem:
I'm trying to setup a bunch of Reolink cameras into HomeKit and I'm unable to get live video working to any end device.
The snapshot function works fine.
If I try to access the video feed then it just times out after 30 seconds with the message;
"No Response This camera is not responding."
If I add the command "vcodec": "copy" to the config then it does work.
I've had a quick look with tcpdump and unless I add "vcodec": "copy" then no data stream flows from the homebridge docker to my Mac.
Something about FFmpeg running breaks the operation.
The issue is, that the camera is dumping an uncompressed h264 stream which chews about 7Mb/sec so being able to manipulate the frame rate, resolution, and compression would be valuable.

Any advice would be greatly appreciated. Thanks,

To Reproduce:

  1. Open home app (Mac, iPhone, iPad)
  2. See the still update (auto refreshes every 10sec)
  3. Open the camera
  4. Spinner for 30sec the get error "No Response This camera is not responding."

Logs:
ffprobe shows the following information about the camera stream;

Input #0, rtsp, from 'rtsp://xxx:[email protected]:554/h264Preview_01_main':
  Metadata:
    title           : Session streamed by "preview"
    comment         : h264Preview_01_main
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 2560x1440, 30 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp

Homebridge Logs:

[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] Video stream requested: 1280x720, 30 fps, 299 kbps
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] Starting video stream: 1280x720, 30 fps, 200 kbps
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] Stream command: /usr/lib/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg -i rtsp://xxx:[email protected]:554/h264Preview_01_main -map 0:0 -vcodec libx264 -pix_fmt yuv420p -r 30 -f rawvideo -preset ultrafast -tune zerolatency -vf scale=1280:720 -b:v 200k -bufsize 400k -maxrate 200k -payload_type 99 -ssrc 2234451 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params 9uUdNN3OeB8pQ23mSz7eedgcRHTAFsTkHFwOpfqr srtp://192.168.178.4:64686?rtcpport=64686&localrtcpport=64686&pkt_size=1316 -map 0:1 -acodec libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -bufsize 24k -ac 1 -payload_type 110 -ssrc 1736348 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params tlITb0pedVZglGVuQN32/WQ2cOvxhpf7zxQNth9w srtp://192.168.178.4:64983?rtcpport=64983&localrtcpport=64983&pkt_size=188 -loglevel level+verbose
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] Received first frame.
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] ffmpeg version 4.2.2-d1e8be3 Copyright (c) 2000-2019 the FFmpeg developers

[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [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
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] libavutil 56. 31.100 / 56. 31.100
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] libavcodec 58. 54.100 / 58. 54.100
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] libavformat 58. 29.100 / 58. 29.100
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] libavdevice 58. 8.100 / 58. 8.100
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] libavfilter 7. 57.100 / 7. 57.100
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] libswscale 5. 5.100 / 5. 5.100
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] libswresample 3. 5.100 / 3. 5.100
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [info] libpostproc 55. 5.100 / 55. 5.100
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [tcp @ 0x55cbe84ba900] [verbose] Starting connection attempt to 192.168.178.142 port 554
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [tcp @ 0x55cbe84ba900] [verbose] Successfully connected to 192.168.178.142 port 554
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [verbose] SDP:
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] v=0
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] o=- 1596297647396054 1 IN IP4 192.168.178.142
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] s=Session streamed by "preview"
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] i=h264Preview_01_main
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] t=0 0
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=tool:LIVE555 Streaming Media v2013.04.08
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=type:broadcast
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=control:*
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=range:npt=0-
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=x-qt-text-nam:Session streamed by "preview"
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=x-qt-text-inf:h264Preview_01_main
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] m=video 0 RTP/AVP 96
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] c=IN IP4 0.0.0.0
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] b=AS:500
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=rtpmap:96 H264/90000
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=range:npt=0-
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6zoAoALWQ==,aO48MA==
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=control:trackID=1
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] m=audio 0 RTP/AVP 97
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] c=IN IP4 0.0.0.0
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] b=AS:256
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=rtpmap:97 MPEG4-GENERIC/16000
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=fmtp:97 streamtype=5;profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408; profile=1;
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] a=control:trackID=2
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [verbose] setting jitter buffer size to 500
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [verbose] setting jitter buffer size to 500
[8/4/2020, 4:46:16 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:17 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe84bc340] [verbose] Reinit context to 2560x1440, pix_fmt: yuv420p
[8/4/2020, 4:46:17 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:17 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] max delay reached. need to consume packet

[8/4/2020, 4:46:17 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] RTP: missed 3 packets

[8/4/2020, 4:46:17 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Input #0, rtsp, from 'rtsp://xxx:[email protected]:554/h264Preview_01_main':
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Metadata:
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] title : Session streamed by "preview"
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] comment : h264Preview_01_main
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Duration: N/A, start: 0.000000, bitrate: N/A
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Stream #0:0: Video: h264 (High), 1 reference frame, yuv420p(progressive, left), 2560x1440, 30 tbr, 90k tbn, 180k tbc
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Stream mapping:
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Stream #0:1 -> #1:0 (aac (native) -> aac (libfdk_aac))
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Press [q] to stop, [?] for help
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [graph_1_in_0_1 @ 0x55cbe88d7a40] [verbose] tb:1/16000 samplefmt:fltp samplerate:16000 chlayout:0x4
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [format_out_1_0 @ 0x55cbe84b8340] [verbose] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_1_0'
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [auto_resampler_0 @ 0x55cbe88d93c0] [verbose] ch:1 chl:mono fmt:fltp r:16000Hz -> ch:1 chl:mono fmt:s16 r:16000Hz
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Output #1, rtp, to 'srtp://192.168.178.4:64983?rtcpport=64983&localrtcpport=64983&pkt_size=188':
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Metadata:
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] title : Session streamed by "preview"
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] comment : h264Preview_01_main
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] encoder : Lavf58.29.100
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Stream #1:0: Audio: aac (libfdk_aac) (ELD), 16000 Hz, mono, s16, delay 288, 24 kb/s
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Metadata:
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] encoder : Lavc58.54.100 libfdk_aac
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe8556780] [verbose] Reinit context to 2560x1440, pix_fmt: yuv420p
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe8644f80] [error] error while decoding MB 122 79, bytestream -7

[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe8644f80] [info] concealing 1687 DC, 1687 AC, 1687 MV errors in P frame
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [Parsed_scale_0 @ 0x55cbe8c142c0] [verbose] w:1280 h:720 flags:'bicubic' interl:0
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [graph 0 input from stream 0:0 @ 0x55cbe9e3d840] [verbose] w:2560 h:1440 pixfmt:yuv420p tb:1/90000 fr:30/1 sar:0/1 sws_param:flags=2
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [Parsed_scale_0 @ 0x55cbe8c142c0] [verbose] w:2560 h:1440 fmt:yuv420p sar:0/1 -> w:1280 h:720 fmt:yuv420p sar:0/1 flags:0x4
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [libx264 @ 0x55cbe8522ec0] [info] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [libx264 @ 0x55cbe8522ec0] [info] profile Constrained Baseline, level 3.1, 4:2:0, 8-bit
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Output #0, rtp, to 'srtp://192.168.178.4:64686?rtcpport=64686&localrtcpport=64686&pkt_size=1316':
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Metadata:
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] title : Session streamed by "preview"
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] comment : h264Preview_01_main
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] encoder : Lavf58.29.100
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Stream #0:0: Video: h264 (libx264), 1 reference frame, yuv420p(left), 1280x720, q=-1--1, 200 kb/s, 30 fps, 90k tbn, 30 tbc
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Metadata:
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] encoder : Lavc58.54.100 libx264
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] Side data:
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] cpb: bitrate max/min/avg: 200000/0/200000 buffer size: 400000 vbv_delay: -1
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0

[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:18 PM] [Camera-ffmpeg] [Study] [info] frame= 27 fps=0.0 q=41.0 size= 18kB time=00:00:01.51 bitrate= 97.1kbits/s speed=3.03x
[8/4/2020, 4:46:19 PM] [Camera-ffmpeg] [Study] [libfdk_aac @ 0x55cbe85509c0] [warning] Queue input is backward in time

[8/4/2020, 4:46:19 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:19 PM] [Camera-ffmpeg] [Study] [rtp @ 0x55cbe85503c0] [warning] Non-monotonous DTS in output stream 1:0; previous: 31456, current: 30909; changing to 31456. This may result in incorrect timestamps in the output file.

[8/4/2020, 4:46:19 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:19 PM] [Camera-ffmpeg] [Study] [info] frame= 42 fps= 42 q=40.0 size= 30kB time=00:00:01.99 bitrate= 122.3kbits/s speed=1.97x
[8/4/2020, 4:46:19 PM] [Camera-ffmpeg] [Study] [rtp @ 0x55cbe85503c0] [warning] Non-monotonous DTS in output stream 1:0; previous: 31456, current: 31421; changing to 31456. This may result in incorrect timestamps in the output file.

[8/4/2020, 4:46:19 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:19 PM] [Camera-ffmpeg] [Study] [info] frame= 59 fps= 39 q=33.0 size= 42kB time=00:00:02.47 bitrate= 137.4kbits/s speed=1.62x
[8/4/2020, 4:46:20 PM] [Camera-ffmpeg] [Study] [info] frame= 75 fps= 36 q=37.0 size= 52kB time=00:00:02.98 bitrate= 141.7kbits/s speed=1.43x
[8/4/2020, 4:46:20 PM] [Camera-ffmpeg] [Study] [info] frame= 75 fps= 36 q=37.0 size= 52kB time=00:00:02.98 bitrate= 141.7kbits/s speed=1.43x
[8/4/2020, 4:46:20 PM] [Camera-ffmpeg] [Study] [info] frame= 90 fps= 34 q=32.0 size= 61kB time=00:00:03.56 bitrate= 141.3kbits/s speed=1.36x
[8/4/2020, 4:46:21 PM] [Camera-ffmpeg] [Study] [info] frame= 107 fps= 34 q=31.0 size= 73kB time=00:00:04.07 bitrate= 146.8kbits/s speed= 1.3x
[8/4/2020, 4:46:21 PM] [Camera-ffmpeg] [Study] [info] frame= 123 fps= 34 q=28.0 size= 83kB time=00:00:04.58 bitrate= 148.9kbits/s speed=1.26x
[8/4/2020, 4:46:22 PM] [Camera-ffmpeg] [Study] [info] frame= 137 fps= 33 q=26.0 size= 93kB time=00:00:05.09 bitrate= 149.5kbits/s speed=1.23x
[8/4/2020, 4:46:22 PM] [Camera-ffmpeg] [Study] [info] frame= 153 fps= 33 q=28.0 size= 102kB time=00:00:05.54 bitrate= 151.3kbits/s speed=1.18x
[8/4/2020, 4:46:23 PM] [Camera-ffmpeg] [Study] [info] frame= 168 fps= 32 q=30.0 size= 112kB time=00:00:06.12 bitrate= 149.2kbits/s speed=1.18x
[8/4/2020, 4:46:23 PM] [Camera-ffmpeg] [Study] [info] frame= 184 fps= 32 q=27.0 size= 122kB time=00:00:06.63 bitrate= 150.3kbits/s speed=1.17x
[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] max delay reached. need to consume packet

[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] RTP: missed 4 packets

[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe8530340] [info] concealing 4786 DC, 4786 AC, 4786 MV errors in P frame
[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study] [info] frame= 199 fps= 32 q=30.0 size= 130kB time=00:00:07.21 bitrate= 147.8kbits/s speed=1.16x
[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] max delay reached. need to consume packet

[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] RTP: missed 4 packets

[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe8530340] [info] concealing 4786 DC, 4786 AC, 4786 MV errors in P frame
[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study] [info] frame= 199 fps= 32 q=30.0 size= 130kB time=00:00:07.21 bitrate= 147.8kbits/s speed=1.16x
[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0

[8/4/2020, 4:46:24 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:25 PM] [Camera-ffmpeg] [Study] [info] frame= 214 fps= 32 q=31.0 size= 141kB time=00:00:07.65 bitrate= 150.5kbits/s speed=1.14x
[8/4/2020, 4:46:25 PM] [Camera-ffmpeg] [Study] [info] frame= 230 fps= 32 q=26.0 size= 151kB time=00:00:08.17 bitrate= 151.1kbits/s speed=1.13x
[8/4/2020, 4:46:26 PM] [Camera-ffmpeg] [Study] [info] frame= 246 fps= 32 q=28.0 size= 160kB time=00:00:08.68 bitrate= 151.2kbits/s speed=1.12x
[8/4/2020, 4:46:26 PM] [Camera-ffmpeg] [Study] [info] frame= 260 fps= 31 q=32.0 size= 195kB time=00:00:09.19 bitrate= 173.7kbits/s speed=1.11x
[8/4/2020, 4:46:27 PM] [Camera-ffmpeg] [Study] [info] frame= 276 fps= 31 q=32.0 size= 201kB time=00:00:09.77 bitrate= 168.2kbits/s speed=1.11x
[8/4/2020, 4:46:27 PM] [Camera-ffmpeg] [Study] [info] frame= 276 fps= 31 q=32.0 size= 201kB time=00:00:09.77 bitrate= 168.2kbits/s speed=1.11x
[8/4/2020, 4:46:27 PM] [Camera-ffmpeg] [Study] [info] frame= 293 fps= 31 q=31.0 size= 210kB time=00:00:10.28 bitrate= 167.4kbits/s speed= 1.1x
[8/4/2020, 4:46:28 PM] [Camera-ffmpeg] [Study] [info] frame= 309 fps= 31 q=31.0 size= 216kB time=00:00:10.79 bitrate= 163.8kbits/s speed= 1.1x
[8/4/2020, 4:46:28 PM] [Camera-ffmpeg] [Study] [info] frame= 324 fps= 31 q=31.0 size= 230kB time=00:00:11.30 bitrate= 166.8kbits/s speed=1.09x
[8/4/2020, 4:46:29 PM] [Camera-ffmpeg] [Study] [info] frame= 338 fps= 31 q=31.0 size= 235kB time=00:00:11.81 bitrate= 162.8kbits/s speed=1.09x
[8/4/2020, 4:46:29 PM] [Camera-ffmpeg] [Study] [info] frame= 355 fps= 31 q=29.0 size= 248kB time=00:00:12.33 bitrate= 164.8kbits/s speed=1.08x
[8/4/2020, 4:46:30 PM] [Camera-ffmpeg] [Study] [info] frame= 369 fps= 31 q=30.0 size= 258kB time=00:00:12.77 bitrate= 165.3kbits/s speed=1.07x
[8/4/2020, 4:46:30 PM] [Camera-ffmpeg] [Study] [info] frame= 384 fps= 31 q=26.0 size= 267kB time=00:00:13.35 bitrate= 163.9kbits/s speed=1.08x
[8/4/2020, 4:46:31 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] max delay reached. need to consume packet

[8/4/2020, 4:46:31 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] RTP: missed 1 packets

[8/4/2020, 4:46:31 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:31 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe8644f80] [info] concealing 9009 DC, 9009 AC, 9009 MV errors in P frame
[8/4/2020, 4:46:31 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:31 PM] [Camera-ffmpeg] [Study] [info] frame= 399 fps= 31 q=28.0 size= 277kB time=00:00:13.80 bitrate= 164.2kbits/s speed=1.07x
[8/4/2020, 4:46:31 PM] [Camera-ffmpeg] [Study] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0

[8/4/2020, 4:46:31 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:31 PM] [Camera-ffmpeg] [Study] [info] frame= 416 fps= 31 q=30.0 size= 290kB time=00:00:14.31 bitrate= 165.9kbits/s speed=1.06x
[8/4/2020, 4:46:32 PM] [Camera-ffmpeg] [Study] [info] frame= 431 fps= 31 q=27.0 size= 300kB time=00:00:14.82 bitrate= 165.9kbits/s speed=1.06x
[8/4/2020, 4:46:32 PM] [Camera-ffmpeg] [Study] [info] frame= 431 fps= 31 q=27.0 size= 300kB time=00:00:14.82 bitrate= 165.9kbits/s speed=1.06x
[8/4/2020, 4:46:32 PM] [Camera-ffmpeg] [Study] [info] frame= 446 fps= 31 q=27.0 size= 310kB time=00:00:15.40 bitrate= 164.9kbits/s speed=1.07x
[8/4/2020, 4:46:33 PM] [Camera-ffmpeg] [Study] [info] frame= 462 fps= 31 q=29.0 size= 321kB time=00:00:15.91 bitrate= 165.2kbits/s speed=1.06x
[8/4/2020, 4:46:33 PM] [Camera-ffmpeg] [Study] [info] frame= 477 fps= 31 q=29.0 size= 332kB time=00:00:16.42 bitrate= 165.4kbits/s speed=1.06x
[8/4/2020, 4:46:34 PM] [Camera-ffmpeg] [Study] [info] frame= 492 fps= 31 q=27.0 size= 342kB time=00:00:16.93 bitrate= 165.2kbits/s speed=1.06x
[8/4/2020, 4:46:34 PM] [Camera-ffmpeg] [Study] [info] frame= 508 fps= 31 q=32.0 size= 381kB time=00:00:17.38 bitrate= 179.7kbits/s speed=1.05x
[8/4/2020, 4:46:34 PM] [Camera-ffmpeg] [Study] [info] frame= 492 fps= 31 q=27.0 size= 342kB time=00:00:16.93 bitrate= 165.2kbits/s speed=1.06x
[8/4/2020, 4:46:34 PM] [Camera-ffmpeg] [Study] [info] frame= 508 fps= 31 q=32.0 size= 381kB time=00:00:17.38 bitrate= 179.7kbits/s speed=1.05x
[8/4/2020, 4:46:35 PM] [Camera-ffmpeg] [Study] [info] frame= 523 fps= 31 q=31.0 size= 393kB time=00:00:18.02 bitrate= 178.4kbits/s speed=1.06x
[8/4/2020, 4:46:35 PM] [Camera-ffmpeg] [Study] [info] frame= 541 fps= 31 q=33.0 size= 403kB time=00:00:18.53 bitrate= 177.9kbits/s speed=1.05x
[8/4/2020, 4:46:36 PM] [Camera-ffmpeg] [Study] [info] frame= 556 fps= 31 q=30.0 size= 411kB time=00:00:19.05 bitrate= 176.9kbits/s speed=1.05x
[8/4/2020, 4:46:36 PM] [Camera-ffmpeg] [Study] [info] frame= 573 fps= 31 q=29.0 size= 421kB time=00:00:19.56 bitrate= 176.4kbits/s speed=1.05x
[8/4/2020, 4:46:37 PM] [Camera-ffmpeg] [Study] [info] frame= 585 fps= 31 q=29.0 size= 428kB time=00:00:20.07 bitrate= 174.6kbits/s speed=1.05x
[8/4/2020, 4:46:37 PM] [Camera-ffmpeg] [Study] [info] frame= 602 fps= 31 q=32.0 size= 435kB time=00:00:20.58 bitrate= 173.2kbits/s speed=1.05x
[8/4/2020, 4:46:38 PM] [Camera-ffmpeg] [Study] [info] frame= 617 fps= 31 q=26.0 size= 445kB time=00:00:21.03 bitrate= 173.5kbits/s speed=1.04x
[8/4/2020, 4:46:38 PM] [Camera-ffmpeg] [Study] [info] frame= 632 fps= 31 q=29.0 size= 455kB time=00:00:21.54 bitrate= 172.9kbits/s speed=1.04x
[8/4/2020, 4:46:39 PM] [Camera-ffmpeg] [Study] [info] frame= 648 fps= 31 q=29.0 size= 469kB time=00:00:22.12 bitrate= 173.7kbits/s speed=1.04x
[8/4/2020, 4:46:39 PM] [Camera-ffmpeg] [Study] [info] frame= 648 fps= 31 q=29.0 size= 469kB time=00:00:22.12 bitrate= 173.7kbits/s speed=1.04x
[8/4/2020, 4:46:39 PM] [Camera-ffmpeg] [Study] [info] frame= 665 fps= 31 q=29.0 size= 480kB time=00:00:22.63 bitrate= 173.7kbits/s speed=1.04x
[8/4/2020, 4:46:40 PM] [Camera-ffmpeg] [Study] [info] frame= 680 fps= 31 q=28.0 size= 491kB time=00:00:23.14 bitrate= 173.9kbits/s speed=1.04x
[8/4/2020, 4:46:41 PM] [Camera-ffmpeg] [Study] [info] frame= 696 fps= 31 q=26.0 size= 503kB time=00:00:23.65 bitrate= 174.1kbits/s speed=1.04x
[8/4/2020, 4:46:41 PM] [Camera-ffmpeg] [Study] [info] frame= 711 fps= 31 q=28.0 size= 514kB time=00:00:24.23 bitrate= 173.8kbits/s speed=1.04x
[8/4/2020, 4:46:42 PM] [Camera-ffmpeg] [Study] [info] frame= 725 fps= 30 q=29.0 size= 523kB time=00:00:24.74 bitrate= 173.2kbits/s speed=1.04x
[8/4/2020, 4:46:42 PM] [Camera-ffmpeg] [Study] [info] frame= 742 fps= 31 q=28.0 size= 538kB time=00:00:25.19 bitrate= 174.8kbits/s speed=1.04x
[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study] [info] frame= 756 fps= 30 q=31.0 size= 577kB time=00:00:25.77 bitrate= 183.5kbits/s speed=1.04x
[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study] [info] frame= 771 fps= 30 q=31.0 size= 588kB time=00:00:26.34 bitrate= 182.9kbits/s speed=1.04x
[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] max delay reached. need to consume packet

[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] RTP: missed 4 packets

[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe8530340] [error] error while decoding MB 123 78, bytestream -23

[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe8530340] [info] concealing 1846 DC, 1846 AC, 1846 MV errors in P frame
[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] max delay reached. need to consume packet

[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study] [rtsp @ 0x55cbe84b8540] [warning] RTP: missed 19 packets

[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55cbe863e4c0] [info] concealing 1996 DC, 1996 AC, 1996 MV errors in P frame
[8/4/2020, 4:46:43 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0

[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study] [info] frame= 788 fps= 30 q=30.0 size= 599kB time=00:00:26.73 bitrate= 183.5kbits/s speed=1.03x
[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0

[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study] [info] frame= 788 fps= 30 q=30.0 size= 599kB time=00:00:26.73 bitrate= 183.5kbits/s speed=1.03x
[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0

[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study] [verbose] *** 1 dup!
[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study]
[8/4/2020, 4:46:44 PM] [Camera-ffmpeg] [Study] [info] frame= 804 fps= 31 q=30.0 size= 614kB time=00:00:27.24 bitrate= 184.5kbits/s dup=1 drop=0 speed=1.03x
[8/4/2020, 4:46:45 PM] [Camera-ffmpeg] [Study] [info] frame= 820 fps= 31 q=29.0 size= 625kB time=00:00:27.75 bitrate= 184.5kbits/s dup=1 drop=0 speed=1.03x
[8/4/2020, 4:46:45 PM] [Camera-ffmpeg] [Study] [info] frame= 835 fps= 30 q=29.0 size= 636kB time=00:00:28.33 bitrate= 183.9kbits/s dup=1 drop=0 speed=1.03x
[8/4/2020, 4:46:46 PM] [Camera-ffmpeg] [Study] [info] frame= 850 fps= 30 q=29.0 size= 646kB time=00:00:28.84 bitrate= 183.5kbits/s dup=1 drop=0 speed=1.03x
[8/4/2020, 4:46:46 PM] [Camera-ffmpeg] [Study] Stopped video stream.
[8/4/2020, 4:46:46 PM] [Camera-ffmpeg] [Study] ffmpeg exited with code: null and signal: SIGKILL (Expected)

Homebridge Config:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:33",
        "port": 51826,
        "pin": "xxx-xx-xxx"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8080,
            "auth": "form",
            "theme": "auto",
            "tempUnits": "c",
            "lang": "auto",
            "sudo": true,
            "log": {
                "method": "file",
                "path": "/var/log/homebridge.log"
            },
            "platform": "config"
        },
        {
            "cameras": [
                {
                    "name": "Study",
                    "manufacturer": "Reolink",
                    "model": "RLC-410",
                    "serialNumber": "ec:71:db:e5:44:aa",
                    "firmwareRevision": "19032101",
                    "videoConfig": {
                        "source": "-i rtsp://xxx:[email protected]:554/h264Preview_01_main",
                        "stillImageSource": "-i http://192.168.178.142:80/cgi-bin/api.cgi?cmd=Snap&channel=0&user=xxx&password=xxx",
                        "audio": true,
                        "debug": true,
                        "maxStreams": 2,
                        "maxWidth": 1280,
                        "maxHeight": 720,
                        "maxFPS": 30,
                        "maxBitrate": 200
                    }
                }
            ],
            "platform": "Camera-ffmpeg"
        }
    ]
}

Environment:

  • Node.js Version: v12.15.0
  • NPM Version: v6.13.4
  • Homebridge Version: v1.1.1
  • Homebridge Camera FFmpeg Version: v2.4.3
  • Homebridge Config UI X Plugin Version: v4.24.0
  • Operating System: Unraid Docker 4.19.107-Unraid
@Sunoo
Copy link
Collaborator

Sunoo commented Aug 4, 2020

Your config looks fine, and it looks like the plugin is at least trying to stream. Do you have multiple network interfaces on whatever you are running Homebridge on by any chance?

@Sunoo
Copy link
Collaborator

Sunoo commented Aug 4, 2020

Just noticed you are using Docker, you almost certainly will need to set interfaceName in your config to get working in there.

@cat2devnull
Copy link
Author

cat2devnull commented Aug 5, 2020

Thanks for the kind response.
I'm new to using Dockers so please bear with me. :)

I believe that there is only one interface and IP assigned to the docker in question.

root@Tower:~# docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
c6482a0cedca        br0                 macvlan             local
1086d87662cd        bridge              bridge              local
6c19b50bb2c4        host                host                local
dcfad1b7bb5d        none                null                local

root@Tower:~# docker network inspect br0
[
    {
        "Name": "br0",
        "Id": "c6482a0cedcac6f5c9af935059992849db92495cd966c150aa9d17099d3be18c",
        "Created": "2020-05-11T15:50:43.116759387+10:00",
        "Scope": "local",
        "Driver": "macvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "192.168.178.0/24",
                    "IPRange": "192.168.178.32/27",
                    "Gateway": "192.168.178.1",
                    "AuxiliaryAddresses": {
                        "server": "192.168.178.7"
                    }
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
            "c6adae5109309df42b2cc65926e7e6b872bed94f637ee865fecabbed293410e4": {
                "Name": "HomeBridge",
                "EndpointID": "9677606794eebc17bd5e0365c5b7a2a5f5570873740efa4cf9d0b22ad6bd1284",
                "MacAddress": "02:42:c0:a8:b2:0f",
                "IPv4Address": "192.168.178.15/24",
                "IPv6Address": ""
            },
        },
        "Options": {
            "parent": "br0"
        },
        "Labels": {}
    }
]

I'm not sure if there is a way to interrogate the network configuration from within the docker because all my usual tools from when I used to be a sysadmin 15+ years ago (ifconfig, netstat, ip, etc) are missing.
I added "interfaceName": "br0" but this didn't help. I'm assuming that within the docker instance the interface is called br0 but I also tried en0 without success.
Also as mentioned earlier, if I set "vcodec": "copy" then the stream is forwarded to the connecting client without issue so I'm not clear why that would make a difference.

Thanks,

@Sunoo
Copy link
Collaborator

Sunoo commented Aug 5, 2020

Yea, the fact that copy works is quite a stumper. I’m honestly not too familiar with Docker myself. I had planned to set one up and do some testing, but the tropical storm knocked my power out and the news says it is likely to be several days before it’s back...

@Sunoo
Copy link
Collaborator

Sunoo commented Aug 6, 2020

While I don’t know much about Docker yet, I do know that the Ring and Nest Cam plugins specifically skip over interfaces starting with ‘br’ which implies that interface is the wrong one to use? dgreif/ring@15d2ace#diff-cd6e197575f6b29fbd71877ac8a01848

I’m still at a loss to why the copy vcodec works in that scenario though, as logically it should be working with the same interface either way.

@cat2devnull
Copy link
Author

So I have managed to get my head around dockers and done a bit of digging.
Here is what the network looks like from inside the docker.

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.15  netmask 255.255.255.0  broadcast 192.168.178.255
        ether 02:42:c0:a8:b2:0f  txqueuelen 0  (Ethernet)
        RX packets 152144  bytes 154674241 (147.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 27633  bytes 14173086 (13.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2201  bytes 6545711 (6.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2201  bytes 6545711 (6.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

All pretty standard stuff.
So I added "interfaceName": "eth0" to the config but it made no difference which is unsurprising since the network setup is pretty traditional.
I've tcpdumped the stream from within the docker as well. I can see the stream come in but no packets outbound.
The next step will be to either capture the traffic and bring it into Wireshark or strace the process and see if I can identify what is failing.
FYI I actually have a Ring doorbell and use Dusty's plugin already. It works fine. If you have any thoughts on testing I can do, let me know.

@Sunoo
Copy link
Collaborator

Sunoo commented Aug 6, 2020

Interesting, I’ve spoken to him a bunch lately, and the only major difference I’m aware of is his method of choosing which NIC to use, which should be irrelevant when you’re specifying interfaceName. Once I have power back I’ll see about tossing his logic into a beta version of this plugin, just to see if that makes any difference.

@cat2devnull
Copy link
Author

Now I am definitely receiving the packets to the end client for both the copied and transcoded streams. I'm starting to think that the docker interface issue is a red herring. It may be the case that my original tcpdump was broken given that I was capturing between two virtual systems using a third virtual system all on the one physical NIC. Hmmm...

HomeKit just can't seem to interpret a transcoded stream...

Working (-vcodec copy):

[8/7/2020, 11:01:35 AM] [Camera-ffmpeg] [Test] Stream command: /usr/lib/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg -i rtsp://xxx:[email protected]:554/h264Preview_01_main -map 0:0 -vcodec copy -pix_fmt yuv420p -r 30 -f rawvideo -preset ultrafast -tune zerolatency -b:v 299k -bufsize 598k -maxrate 299k -payload_type 99 -ssrc 15841681 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params 0EEPAFInA/kgw171Y5TAiGX7bAKF/oHs1d/uvwY7 srtp://192.168.178.4:58545?rtcpport=58545&localrtcpport=58545&pkt_size=1316 -map 0:1 -acodec libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -bufsize 24k -ac 1 -payload_type 110 -ssrc 2476139 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params dQQj9q4VXGCBB5LBR0JdphSgOZqETLXWx5JhUYlN srtp://192.168.178.4:64888?rtcpport=64888&localrtcpport=64888&pkt_size=188 -loglevel level+verbose

Broken (-vcodec libx264):

[8/7/2020, 11:02:30 AM] [Camera-ffmpeg] [Study] Stream command: /usr/lib/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg -i rtsp://xxx:[email protected]:554/h264Preview_01_main -map 0:0 -vcodec libx264 -pix_fmt yuv420p -r 30 -f rawvideo -preset ultrafast -tune zerolatency -b:v 299k -bufsize 598k -maxrate 299k -payload_type 99 -ssrc 8311756 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params n4sOH8nugfdPXITICapFqm4KT/T8oXLUDIAtndMb srtp://192.168.178.4:50816?rtcpport=50816&localrtcpport=50816&pkt_size=1316 -map 0:1 -acodec libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -bufsize 24k -ac 1 -payload_type 110 -ssrc 2287504 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params cXe/SKjWMVh1B+rX5v0NhqHKAg+QQ9PoRltZle9L srtp://192.168.178.4:57483?rtcpport=57483&localrtcpport=57483&pkt_size=188 -loglevel level+verbose

I can't see anything different between the two commands beyond the obvious.
I've also tried a different Reolink RLC-420 camera just in case it was something specific to the 410.
Could the act of transcoding be breaking the stream in some interesting way?
Could there be an issue with signalling between your software and HomeKit? I assume that HomeKit asks for the stream to be sent to an IP:Port but not sure how that process happens.
Do you know if there is some way to just launch FFmpeg by hand and push the result to another streaming app like VLC to check if it works?
Thanks,

@Sunoo
Copy link
Collaborator

Sunoo commented Aug 10, 2020

The weird thing is that transcoding typically makes things more compatible. I’ve seen more than a few cases where the camera is sending h264, but HomeKit won’t handle it until it’s been transcoded.

Basically you understand correctly, HomeKit asks for the stream to be sent to an IP and port for both video and audio, but ignores the stream if it doesn’t come from the same IP address that it asked. That’s the issue we see a lot with a device with multiple NICs.

I can’t think of a real way to push to VLC like that, but even if you got that set up, VLC would almost certainly be a lot less picky than HomeKit.

For what it’s worth, I asked around to a few other developers to see if they had any ideas for this issue. Their best guess was that perhaps your Docker container wasn’t given enough CPU resources. I still need to play with Docker more myself, because I don’t currently have too much understanding of it.

@cat2devnull
Copy link
Author

Not a CPU issue, my Docker has 4 cores on an AMD 3950x so a bit spoilt for CPU cycles. :) As you can see below, the transcode speed is always well above 1.0x

[8/11/2020, 5:55:31 PM] [Camera-ffmpeg] [Study] [info] frame= 41 fps=0.0 q=39.0 size= 41kB time=00:00:02.54 bitrate= 131.8kbits/s dup=20 drop=0 speed=4.93x
[8/11/2020, 5:55:31 PM] [Camera-ffmpeg] [Study] [info] frame= 55 fps= 53 q=37.0 size= 53kB time=00:00:03.05 bitrate= 142.5kbits/s dup=27 drop=0 speed=2.92x
[8/11/2020, 5:55:32 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55e8b8d4a180] [error] error while decoding MB 94 26, bytestream -5
[8/11/2020, 5:55:32 PM] [Camera-ffmpeg] [Study] [h264 @ 0x55e8b8d4a180] [info] concealing 10195 DC, 10195 AC, 10195 MV errors in P frame
[8/11/2020, 5:55:32 PM] [Camera-ffmpeg] [Study] [info] frame= 72 fps= 47 q=40.0 size= 68kB time=00:00:03.56 bitrate= 157.0kbits/s dup=37 drop=0 speed=2.31x
[8/11/2020, 5:55:32 PM] [Camera-ffmpeg] [Study] [info] frame= 88 fps= 43 q=39.0 size= 81kB time=00:00:04.14 bitrate= 159.6kbits/s dup=45 drop=0 speed=2.02x
[8/11/2020, 5:55:33 PM] [Camera-ffmpeg] [Study] [info] frame= 104 fps= 40 q=39.0 size= 94kB time=00:00:04.59 bitrate= 167.3kbits/s dup=53 drop=0 speed=1.78x

I'll try setting up a brand new HomeBridge on a different platform and see if I can get it to work there. If so then I can try debugging between the two platforms to see what the difference could be. I should get a chance on my days off later this week.

@Sunoo
Copy link
Collaborator

Sunoo commented Aug 11, 2020

Of course it isn’t, that would have made it too easy. x.x

Your most recent log shows something interesting though. The transcode speed seems decently high, but you’re getting around 50% duplicate frames, which is something I’ve seen on slow systems, but could be network or other things too.

I’m not the biggest expert on FFmpeg, because it is just a huge project, but my recollection is that is often seen when it can’t keep up with decoding the input.

I don’t believe I was seeing dupe frame counts nearly that high in your earlier logs though, has anything changed?

@cat2devnull
Copy link
Author

Hmmm, not sure about the dup frame issue. I have been playing around with frame rate and maybe that was from a run where I was discarding frames for a frame rate lower than 30. I always see a small amount of dup frames as in the run below. It could also be that the camera is just sending dup frames as there was no movement in the frame.
As for network it is all 1Gb wired, although the camera itself is 100Mb. The switch isn't reporting needing to drop any eth frames.
I tried installing a new HomeBridge on my Mac and configured the camera but it has the same issue (so this fault doesn't appear to be docker related).
I've included a full debug below. It does spit a lot of errors and warning but I don't know if this is normal or a sign of something wrong or if these errors are in some way fatal.

[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] Video stream requested: 1280x720, 30 fps, 299 kbps
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] Starting video stream: 1280x720, 30 fps, 299 kbps
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] Stream command: /usr/local/lib/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg -i rtsp://xxx:[email protected]:554/h264Preview_01_main -map 0:0 -vcodec libx264 -pix_fmt yuv420p -r 30 -f rawvideo -preset ultrafast -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 598k -maxrate 299k -payload_type 99 -ssrc 8875835 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params Z3UXopdzwRCbC4LOJ8RNJk2GhC7X7LbeZ5tFehfH srtp://192.168.178.112:63703?rtcpport=63703&localrtcpport=63703&pkt_size=1316 -map 0:1 -acodec libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -bufsize 24k -ac 1 -payload_type 110 -ssrc 3424648 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params by2KuUkhwGwkyYKhUwhAZ+HjvFitwEBjam2DR7ap srtp://192.168.178.112:57009?rtcpport=57009&localrtcpport=57009&pkt_size=188 -loglevel level+verbose
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] Received first frame.
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info] ffmpeg version v0.0.6 Copyright (c) 2000-2019 the FFmpeg developers
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   built with Apple clang version 11.0.3 (clang-1103.0.32.62)
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   configuration: --enable-videotoolbox --pkgconfigdir=/Users/runner/runners/2.263.0/work/ffmpeg-for-homebridge/ffmpeg-for-homebridge/build/workspace/lib/pkgconfig --prefix=/Users/runner/runners/2.263.0/work/ffmpeg-for-homebridge/ffmpeg-for-homebridge/build/workspace --pkg-config-flags=--static --extra-cflags=-I/Users/runner/runners/2.263.0/work/ffmpeg-for-homebridge/ffmpeg-for-homebridge/build/workspace/include --extra-ldflags=-L/Users/runner/runners/2.263.0/work/ffmpeg-for-homebridge/ffmpeg-for-homebridge/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
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   libavutil      56. 31.100 / 56. 31.100
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   libavcodec     58. 54.100 / 58. 54.100
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   libavformat    58. 29.100 / 58. 29.100
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   libavdevice    58.  8.100 / 58.  8.100
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   libavfilter     7. 57.100 /  7. 57.100
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   libswscale      5.  5.100 /  5.  5.100
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   libswresample   3.  5.100 /  3.  5.100
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [info]   libpostproc    55.  5.100 / 55.  5.100
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [tcp @ 0x7fa4bfd04600] [verbose] Starting connection attempt to 192.168.178.142 port 554
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [tcp @ 0x7fa4bfd04600] [verbose] Successfully connected to 192.168.178.142 port 554
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [verbose] SDP:
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] v=0
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] o=- 1597382851377645 1 IN IP4 192.168.178.142
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] s=Session streamed by "preview"
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] i=h264Preview_01_main
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] t=0 0
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=tool:LIVE555 Streaming Media v2013.04.08
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=type:broadcast
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=control:*
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=range:npt=0-
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=x-qt-text-nam:Session streamed by "preview"
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=x-qt-text-inf:h264Preview_01_main
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] m=video 0 RTP/AVP 96
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] c=IN IP4 0.0.0.0
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] b=AS:500
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=rtpmap:96 H264/90000
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=fmtp:96 packetization-mode=1;profile-level-id=420033;sprop-parameter-sets=Z0IAM/QBQAWsgA==,aM48gA==
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=control:trackID=1
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] m=audio 0 RTP/AVP 97
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] c=IN IP4 0.0.0.0
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] b=AS:256
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=rtpmap:97 MPEG4-GENERIC/16000
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=fmtp:97 streamtype=5;profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408; profile=1;
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] a=control:trackID=2
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [verbose] setting jitter buffer size to 500
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [verbose] setting jitter buffer size to 500
[8/14/2020, 4:13:25 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:27 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2808800] [verbose] Reinit context to 2560x1440, pix_fmt: yuv420p
[8/14/2020, 4:13:27 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 5 packets
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2808800] [error] negative number of zero coeffs at 110 76
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2808800] [error] error while decoding MB 110 76
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2808800] [info] concealing 2179 DC, 2179 AC, 2179 MV errors in P frame
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 3 packets
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info] Input #0, rtsp, from 'rtsp://xxx:[email protected]:554/h264Preview_01_main':
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]   Metadata:
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     title           : Session streamed by "preview"
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     comment         : h264Preview_01_main
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]   Duration: N/A, start: 0.000000, bitrate: N/A
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     Stream #0:0: Video: h264 (Baseline), 1 reference frame, yuv420p(progressive, left), 2560x1440, 30 tbr, 90k tbn, 180k tbc
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info] Stream mapping:
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test]   Stream #0:1 -> #1:0 (aac (native) -> aac (libfdk_aac))
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info] Press [q] to stop, [?] for help
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [graph_1_in_0_1 @ 0x7fa4c5304400] [verbose] tb:1/16000 samplefmt:fltp samplerate:16000 chlayout:0x4
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [format_out_1_0 @ 0x7fa4c5304ac0] [verbose] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_1_0'
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [auto_resampler_0 @ 0x7fa4c1b04400] [verbose] ch:1 chl:mono fmt:fltp r:16000Hz -> ch:1 chl:mono fmt:s16 r:16000Hz
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info] Output #1, rtp, to 'srtp://192.168.178.112:57009?rtcpport=57009&localrtcpport=57009&pkt_size=188':
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]   Metadata:
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     title           : Session streamed by "preview"
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test]     comment         : h264Preview_01_main
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     encoder         : Lavf58.29.100
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     Stream #1:0: Audio: aac (libfdk_aac) (ELD), 16000 Hz, mono, s16, delay 288, 24 kb/s
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     Metadata:
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]       encoder         : Lavc58.54.100 libfdk_aac
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2028a00] [verbose] Reinit context to 2560x1440, pix_fmt: yuv420p
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [error] negative number of zero coeffs at 110 76
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [error] error while decoding MB 110 76
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [info] concealing 2179 DC, 2179 AC, 2179 MV errors in P frame
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [libfdk_aac @ 0x7fa4c2028400] [warning] Queue input is backward in time
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtp @ 0x7fa4c200b600] [warning] Non-monotonous DTS in output stream 1:0; previous: 8928, current: 8357; changing to 8928. This may result in incorrect timestamps in the output file.
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2053a00] [error] cbp too large (72) at 113 70
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2053a00] [error] error while decoding MB 113 70
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2053a00] [info] concealing 3136 DC, 3136 AC, 3136 MV errors in P frame
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [Parsed_scale_0 @ 0x7fa4c5505880] [verbose] w:1280 h:720 flags:'bicubic' interl:0
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [graph 0 input from stream 0:0 @ 0x7fa4c5506100] [verbose] w:2560 h:1440 pixfmt:yuv420p tb:1/90000 fr:30/1 sar:0/1 sws_param:flags=2
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [Parsed_scale_0 @ 0x7fa4c5505880] [verbose] w:2560 h:1440 fmt:yuv420p sar:0/1 -> w:1280 h:720 fmt:yuv420p sar:0/1 flags:0x4
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [libx264 @ 0x7fa4c2026c00] [info] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [libx264 @ 0x7fa4c2026c00] [info] profile Constrained Baseline, level 3.1, 4:2:0, 8-bit
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info] Output #0, rtp, to 'srtp://192.168.178.112:63703?rtcpport=63703&localrtcpport=63703&pkt_size=1316':
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]   Metadata:
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     title           : Session streamed by "preview"
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     comment         : h264Preview_01_main
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     encoder         : Lavf58.29.100
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     Stream #0:0: Video: h264 (libx264), 1 reference frame, yuv420p(left), 1280x720, q=-1--1, 299 kb/s, 30 fps, 90k tbn, 30 tbc
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     Metadata:
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]       encoder         : Lavc58.54.100 libx264
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]     Side data:
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [info]       cpb: bitrate max/min/avg: 299000/0/299000 buffer size: 598000 vbv_delay: -1
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtp @ 0x7fa4c200b600] [warning] Non-monotonous DTS in output stream 1:0; previous: 8928, current: 8869; changing to 8928. This may result in incorrect timestamps in the output file.
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 1 packets
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 12 packets
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 24 packets
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054000] [error] mb_type 27 in P slice too large at 120 86
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054000] [error] error while decoding MB 120 86
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054000] [info] concealing 569 DC, 569 AC, 569 MV errors in P frame
[8/14/2020, 4:13:28 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 15 packets
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [error] negative number of zero coeffs at 92 21
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [error] error while decoding MB 92 21
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [info] concealing 10997 DC, 10997 AC, 10997 MV errors in P frame
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [info] frame=   23 fps=0.0 q=38.0 size=      24kB time=00:00:01.45 bitrate= 133.2kbits/s speed=2.82x    
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [verbose] *** 3 dup!
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:29 PM] [Camera FFmpeg] [Mac-test] [info] frame=   43 fps= 42 q=31.0 size=      46kB time=00:00:02.02 bitrate= 184.8kbits/s dup=3 drop=0 speed=1.99x    
[8/14/2020, 4:13:30 PM] [Camera FFmpeg] [Mac-test] [info] frame=   57 fps= 37 q=33.0 size=      60kB time=00:00:02.47 bitrate= 199.4kbits/s dup=3 drop=0 speed=1.63x    
[8/14/2020, 4:13:30 PM] [Camera FFmpeg] [Mac-test] [info] frame=   71 fps= 35 q=29.0 size=      74kB time=00:00:02.98 bitrate= 204.1kbits/s dup=3 drop=0 speed=1.47x    
[8/14/2020, 4:13:31 PM] [Camera FFmpeg] [Mac-test] [info] frame=   87 fps= 34 q=30.0 size=      90kB time=00:00:03.49 bitrate= 210.1kbits/s dup=3 drop=0 speed=1.38x    
[8/14/2020, 4:13:31 PM] [Camera FFmpeg] [Mac-test] [info] frame=  104 fps= 34 q=27.0 size=     105kB time=00:00:03.94 bitrate= 218.5kbits/s dup=3 drop=0 speed=1.29x    
[8/14/2020, 4:13:32 PM] [Camera FFmpeg] [Mac-test] [info] frame=  120 fps= 34 q=27.0 size=     120kB time=00:00:04.52 bitrate= 216.5kbits/s dup=3 drop=0 speed=1.27x    
[8/14/2020, 4:13:32 PM] [Camera FFmpeg] [Mac-test] [info] frame=  135 fps= 33 q=28.0 size=     134kB time=00:00:05.03 bitrate= 217.7kbits/s dup=3 drop=0 speed=1.23x    
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [info] frame=  149 fps= 32 q=26.0 size=     147kB time=00:00:05.54 bitrate= 216.8kbits/s dup=3 drop=0 speed=1.21x    
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 2 packets
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2051c00] [error] Invalid level prefix
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2051c00] [error] error while decoding MB 121 85
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2051c00] [info] concealing 728 DC, 728 AC, 728 MV errors in P frame
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 8 packets
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 1 packets
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054600] [error] negative number of zero coeffs at 155 28
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054600] [error] error while decoding MB 155 28
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054600] [info] concealing 9814 DC, 9814 AC, 9814 MV errors in P frame
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [info] frame=  164 fps= 32 q=26.0 size=     162kB time=00:00:05.99 bitrate= 221.3kbits/s dup=3 drop=0 speed=1.17x    
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:33 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:34 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:34 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:34 PM] [Camera FFmpeg] [Mac-test] [info] frame=  180 fps= 32 q=31.0 size=     178kB time=00:00:06.50 bitrate= 224.4kbits/s dup=3 drop=0 speed=1.16x    
[8/14/2020, 4:13:34 PM] [Camera FFmpeg] [Mac-test] [info] frame=  195 fps= 32 q=27.0 size=     193kB time=00:00:07.01 bitrate= 225.0kbits/s dup=3 drop=0 speed=1.15x    
[8/14/2020, 4:13:35 PM] [Camera FFmpeg] [Mac-test] [info] frame=  211 fps= 32 q=27.0 size=     207kB time=00:00:07.53 bitrate= 225.0kbits/s dup=3 drop=0 speed=1.14x    
[8/14/2020, 4:13:35 PM] [Camera FFmpeg] [Mac-test] [info] frame=  225 fps= 31 q=26.0 size=     221kB time=00:00:08.10 bitrate= 223.5kbits/s dup=3 drop=0 speed=1.13x    
[8/14/2020, 4:13:36 PM] [Camera FFmpeg] [Mac-test] [info] frame=  242 fps= 32 q=28.0 size=     237kB time=00:00:08.61 bitrate= 225.6kbits/s dup=3 drop=0 speed=1.13x    
[8/14/2020, 4:13:36 PM] [Camera FFmpeg] [Mac-test] [info] frame=  258 fps= 32 q=30.0 size=     286kB time=00:00:09.13 bitrate= 256.4kbits/s dup=3 drop=0 speed=1.12x    
[8/14/2020, 4:13:37 PM] [Camera FFmpeg] [Mac-test] [info] frame=  273 fps= 31 q=30.0 size=     297kB time=00:00:09.64 bitrate= 252.0kbits/s dup=3 drop=0 speed=1.11x    
[8/14/2020, 4:13:37 PM] [Camera FFmpeg] [Mac-test] [info] frame=  289 fps= 31 q=29.0 size=     310kB time=00:00:10.09 bitrate= 251.3kbits/s dup=3 drop=0 speed= 1.1x    
[8/14/2020, 4:13:38 PM] [Camera FFmpeg] [Mac-test] [info] frame=  304 fps= 31 q=30.0 size=     319kB time=00:00:10.73 bitrate= 243.8kbits/s dup=3 drop=0 speed= 1.1x    
[8/14/2020, 4:13:38 PM] [Camera FFmpeg] [Mac-test] [info] frame=  319 fps= 31 q=25.0 size=     335kB time=00:00:11.17 bitrate= 245.5kbits/s dup=3 drop=0 speed=1.09x    
[8/14/2020, 4:13:39 PM] [Camera FFmpeg] [Mac-test] [info] frame=  335 fps= 31 q=26.0 size=     365kB time=00:00:11.69 bitrate= 255.6kbits/s dup=3 drop=0 speed=1.09x    
[8/14/2020, 4:13:39 PM] [Camera FFmpeg] [Mac-test] [info] frame=  350 fps= 31 q=29.0 size=     371kB time=00:00:12.13 bitrate= 250.5kbits/s dup=3 drop=0 speed=1.08x    
[8/14/2020, 4:13:40 PM] [Camera FFmpeg] [Mac-test] [info] frame=  365 fps= 31 q=29.0 size=     388kB time=00:00:12.71 bitrate= 249.9kbits/s dup=3 drop=0 speed=1.08x    
[8/14/2020, 4:13:40 PM] [Camera FFmpeg] [Mac-test] [info] frame=  380 fps= 31 q=28.0 size=     404kB time=00:00:13.22 bitrate= 250.0kbits/s dup=3 drop=0 speed=1.08x    
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 3 packets
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 3 packets
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] [info] frame=  394 fps= 31 q=29.0 size=     420kB time=00:00:13.67 bitrate= 251.5kbits/s dup=3 drop=0 speed=1.07x    
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] [verbose] *** 1 dup!
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:41 PM] [Camera FFmpeg] [Mac-test] [info] frame=  412 fps= 31 q=28.0 size=     445kB time=00:00:14.25 bitrate= 255.6kbits/s dup=4 drop=0 speed=1.07x    
[8/14/2020, 4:13:42 PM] [Camera FFmpeg] [Mac-test] [info] frame=  427 fps= 31 q=29.0 size=     462kB time=00:00:14.76 bitrate= 256.4kbits/s dup=4 drop=0 speed=1.07x    
[8/14/2020, 4:13:42 PM] [Camera FFmpeg] [Mac-test] [info] frame=  442 fps= 31 q=28.0 size=     479kB time=00:00:15.27 bitrate= 257.1kbits/s dup=4 drop=0 speed=1.07x    
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [info] frame=  456 fps= 31 q=28.0 size=     494kB time=00:00:15.78 bitrate= 256.3kbits/s dup=4 drop=0 speed=1.06x    
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] 
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [warning] RTP: missed 4 packets
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [error] out of range intra chroma pred mode
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [error] error while decoding MB 143 85
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [info] concealing 706 DC, 706 AC, 706 MV errors in P frame
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 2 packets
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2017e00] [error] 
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] P sub_mb_type 4 out of range at 57 73
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2017e00] [error] error while decoding MB 57 73
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2017e00] [info] concealing 2712 DC, 2712 AC, 2712 MV errors in P frame
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:43 PM] [Camera FFmpeg] [Mac-test] [info] frame=  472 fps= 31 q=28.0 size=     515kB time=00:00:16.29 bitrate= 259.0kbits/s dup=4 drop=0 speed=1.06x    
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] [verbose] *** 1 dup!
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] [info] frame=  488 fps= 31 q=29.0 size=     536kB time=00:00:16.87 bitrate= 260.4kbits/s dup=5 drop=0 speed=1.06x    
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 2 packets
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2053a00] [error] corrupted macroblock 143 85 (total_coeff=-1)
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2053a00] [error] error while decoding MB 143 85
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2053a00] [info] concealing 706 DC, 706 AC, 706 MV errors in P frame
[8/14/2020, 4:13:44 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [info] frame=  504 fps= 31 q=31.0 size=     588kB time=00:00:17.32 bitrate= 278.0kbits/s dup=5 drop=0 speed=1.06x    
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 11 packets
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 2 packets
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054600] [error] mb_type 33 in P slice too large at 134 62
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054600] [error] error while decoding MB 134 62
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054600] [info] concealing 4395 DC, 4395 AC, 4395 MV errors in P frame
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [info] frame=  517 fps= 31 q=29.0 size=     605kB time=00:00:17.89 bitrate= 277.1kbits/s dup=5 drop=0 speed=1.06x    
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] [verbose] *** 1 dup!
[8/14/2020, 4:13:45 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:46 PM] [Camera FFmpeg] [Mac-test] [info] frame=  535 fps= 31 q=29.0 size=     629kB time=00:00:18.41 bitrate= 279.8kbits/s dup=6 drop=0 speed=1.05x    
[8/14/2020, 4:13:46 PM] [Camera FFmpeg] [Mac-test] [info] frame=  551 fps= 31 q=29.0 size=     648kB time=00:00:18.85 bitrate= 281.4kbits/s dup=6 drop=0 speed=1.05x    
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] [info] 
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] frame=  566 fps= 31 q=29.0 size=     660kB time=00:00:19.37 bitrate= 279.0kbits/s dup=6 drop=0 speed=1.05x    
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 1 packets
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [error] mb_type 32 in P slice too large at 68 86
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [error] error while decoding MB 68 86
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043e00] [info] concealing 621 DC, 621 AC, 621 MV errors in P frame
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] [info] frame=  581 fps= 31 q=29.0 size=     673kB time=00:00:19.88 bitrate= 277.3kbits/s dup=6 drop=0 speed=1.05x    
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:47 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:48 PM] [Camera FFmpeg] [Mac-test] [info] frame=  596 fps= 31 q=28.0 size=     688kB time=00:00:20.45 bitrate= 275.6kbits/s dup=6 drop=0 speed=1.05x    
[8/14/2020, 4:13:48 PM] [Camera FFmpeg] [Mac-test] [info] frame=  612 fps= 31 q=29.0 size=     703kB time=00:00:20.97 bitrate= 274.5kbits/s dup=6 drop=0 speed=1.05x    
[8/14/2020, 4:13:49 PM] [Camera FFmpeg] [Mac-test] [info] frame=  626 fps= 30 q=28.0 size=     721kB time=00:00:21.48 bitrate= 274.8kbits/s dup=6 drop=0 speed=1.05x    
[8/14/2020, 4:13:49 PM] [Camera FFmpeg] [Mac-test] [info] frame=  643 fps= 31 q=28.0 size=     740kB time=00:00:21.99 bitrate= 275.8kbits/s dup=6 drop=0 speed=1.05x    
[8/14/2020, 4:13:50 PM] [Camera FFmpeg] [Mac-test] [info] frame=  658 fps= 31 q=28.0 size=     756kB time=00:00:22.50 bitrate= 275.2kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:50 PM] [Camera FFmpeg] [Mac-test] [info] frame=  675 fps= 31 q=28.0 size=     773kB time=00:00:23.08 bitrate= 274.5kbits/s dup=6 drop=0 speed=1.05x    
[8/14/2020, 4:13:51 PM] [Camera FFmpeg] [Mac-test] [info] frame=  690 fps= 31 q=28.0 size=     791kB time=00:00:23.53 bitrate= 275.3kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:51 PM] [Camera FFmpeg] [Mac-test] [info] frame=  704 fps= 31 q=28.0 size=     807kB time=00:00:23.97 bitrate= 275.8kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:52 PM] [Camera FFmpeg] [Mac-test] [info] frame=  720 fps= 31 q=28.0 size=     827kB time=00:00:24.55 bitrate= 275.8kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:52 PM] [Camera FFmpeg] [Mac-test] [info] frame=  735 fps= 30 q=28.0 size=     843kB time=00:00:25.06 bitrate= 275.6kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] [info] frame=  751 fps= 30 q=31.0 size=     894kB time=00:00:25.57 bitrate= 286.3kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] [info] frame=  765 fps= 30 q=29.0 size=     910kB time=00:00:26.15 bitrate= 285.1kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] 
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] max delay reached. need to consume packet
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 11 packets
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2051600] [error] negative number of zero coeffs at 126 39
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2051600] [error] error while decoding MB 126 39
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2051600] [info] concealing 8083 DC, 8083 AC, 8083 MV errors in I frame
[8/14/2020, 4:13:53 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [info] frame=  778 fps= 30 q=29.0 size=     925kB time=00:00:26.66 bitrate= 284.0kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 3 packets
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043200] [error] corrupted macroblock 65 82 (total_coeff=-1)
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043200] [error] error while decoding MB 65 82
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2043200] [info] concealing 1264 DC, 1264 AC, 1264 MV errors in P frame
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 3 packets
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [error] Invalid UE golomb code
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2053400] [error] cbp too large (3199971767) at 112 79
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2053400] [error] error while decoding MB 112 79
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2053400] [info] concealing 1697 DC, 1697 AC, 1697 MV errors in P frame
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [info] frame=  799 fps= 30 q=29.0 size=     953kB time=00:00:27.17 bitrate= 287.2kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] [warning] rtsp://xxx:[email protected]:554/h264Preview_01_main: corrupt decoded frame in stream 0
[8/14/2020, 4:13:54 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:55 PM] [Camera FFmpeg] [Mac-test] [info] frame=  814 fps= 30 q=29.0 size=     971kB time=00:00:27.69 bitrate= 287.2kbits/s dup=6 drop=0 speed=1.04x    
[8/14/2020, 4:13:55 PM] [Camera FFmpeg] [Mac-test] [info] frame=  829 fps= 30 q=29.0 size=     986kB time=00:00:28.13 bitrate= 287.2kbits/s dup=6 drop=0 speed=1.03x    
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] max delay reached. need to consume packet
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] [rtsp @ 0x7fa4c0008c00] [warning] RTP: missed 2 packets
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054c00] [error] negative number of zero coeffs at 85 82
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054c00] [error] error while decoding MB 85 82
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] [h264 @ 0x7fa4c2054c00] [info] concealing 1244 DC, 1244 AC, 1244 MV errors in P frame
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] 
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] Stopped video stream.
[8/14/2020, 4:13:56 PM] [Camera FFmpeg] [Mac-test] ffmpeg exited with code: null and signal: SIGKILL (Expected)

@Sunoo
Copy link
Collaborator

Sunoo commented Aug 14, 2020

Try adding -rtsp_transport tcp to the start of your source in your config.

@cat2devnull
Copy link
Author

This shifted the stream between the camera and the HomeBridge to use TCP but didn't result in any change. Understandably the stream between HomeBridge and the end client is still UDP.
Do you know if there are any differences in encoding options between your code and the code that Dusty uses to transcode the ring stream?

@Sunoo
Copy link
Collaborator

Sunoo commented Aug 15, 2020

I'll check his code again tomorrow, but as far as I'm aware, we should be doing basically the same encoding.

@github-actions
Copy link

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.

@justinpeterson13
Copy link

Realize this is stale, but I've solved my own problem after hours of researching. Had to change my source stream from
-re -i rtsp://192.168.1.169:554/live/av0?user=&passwd=
to
-re -i rtsp://192.168.1.169:554/live/av1?user=*&passwd=

Turns out it was the source stream all along.

@Sunoo
Copy link
Collaborator

Sunoo commented Jan 6, 2021

Great, glad you got it working.

@cat2devnull
Copy link
Author

Hi Justin,
What camera are you using? I'm guessing from the format of your rtsp command it is an Avantgarde S610 or similar.
I still have had no luck with the Reolink cameras.
I'm using a workaround where I just pass the raw video from the standard def sub feed. It's good enough for what I need which is to be able to check the cameras on the go from my mobile.

"source": "-rtsp_transport tcp -i rtsp://x:[email protected]:554/h264Preview_01_sub",
"stillImageSource": "-i http://192.168.178.25:80/cgi-bin/api.cgi?cmd=Snap&channel=0&user=x&password=x",
"audio": true,
"videoFilter": "none",
"vcodec": "copy"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants