blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
17.73k stars 1.62k forks source link

[Support]: Getting a lot of RTSP and ffmpeg errors in the logs #3754

Closed Ming-A closed 1 year ago

Ming-A commented 1 year ago

Describe the problem you are having

In the logs im getting a lot of errors related to RTSP and ffmpeg. I have 7 cameras, 5 of the cameras are the Hikvision DS-2CD1023G0E-I(L) and 2 of them are TP-Link VIGI C400HP.

The setting on all of the Hikvision cameras are 1080p res, 15fps, and on H.264+ (I have tried with normal H.264 as well but still had errors). The res on the tp-link cameras is 2304x1296 with 15fps and H.264.

Hardware: MacBook Pro 2013 running proxmox and docker in an LXC container along with a coral USB.

Version

0.10.1-83481AF

Frigate config file

mqtt:
  host: 10.69.40.4
  user: USERNAME
  password: PASSWORD

database:
  path: /media/frigate/database/frigate.db

birdseye:
  enabled: True
  mode: continuous
  quality: 5

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p

detect:
#  width: 1920
#  height: 1080
  fps: 5
  enabled: True

objects:
  track:
    - person
    - car
    - motorcycle
    - cat
    - dog

#record:
#  enabled: True
#  retain:
#    days: 28
#  events:
#    max_seconds: 300
#    # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
#    required_zones: []
#    # Optional: Retention settings for recordings of events
#    retain:
#      # Required: Default retention days (default: shown below)
#      default: 10

snapshots:
  enabled: True
  # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
  required_zones: []
  retain:
    # Required: Default retention days (default: shown below)
    default: 10

live:
  height: 1080
  quality: 8

cameras:
  carport-front:
    ffmpeg:
      inputs:
        - path: rtsp://USERNAME:PASSWORD@10.69.25.10:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
          roles:
            - detect
            - rtmp
#    record:
#      events:
#        required_zones:
#          - insidecarport
#          - outsidecarport
    snapshots:
      required_zones:
        - insidecarport
        - outsidecarport
    zones:
      insidecarport:
        coordinates: 1280,720,1280,446,1224,319,1156,225,1025,139,690,125,0,140,0,720
        objects:
          - person
          - motorcycle
          - cat
          - dog
      outsidecarport:
        coordinates: 1280,0,1280,136,0,129,0,0
        objects:
          - car
          - person
          - motorcycle
          - cat
          - dog

  garden:
    ffmpeg:
      inputs:
        - path: rtsp://USERNAME:PASSWORD@10.69.25.11:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
          roles:
            - detect
            - rtmp
#    record:
#      events:
#        required_zones:
#          - gardenzone
    snapshots:
      required_zones:
        - gardenzone
    zones:
      gardenzone:
        coordinates: 0,720,1280,720,1280,0,0,0
        objects:
          - person
          - motorcycle
          - cat
          - dog

  left:
    ffmpeg:
      inputs:
        - path: rtsp://USERNAME:PASSWORD@10.69.25.12:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
          roles:
            - detect
            - rtmp

  right:
    ffmpeg:
      inputs:
        - path: rtsp://USERNAME:PASSWORD@10.69.25.13:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
          roles:
            - detect
            - rtmp
    motion:
      mask:
        - 514,191,519,161,781,80,759,0,552,0,188,0,205,80,301,136,331,269

  back:
    ffmpeg:
      inputs:
        - path: rtsp://USERNAME:PASSWORD@10.69.25.14:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
          roles:
            - detect
            - rtmp
    motion:
      mask:
        - 1280,402,1280,0,924,0,673,0,973,155,944,161,786,127,660,100,649,174,725,196,708,225,743,234,870,265

  foyer:
    ffmpeg:
      inputs:
        - path: rtsp://USERNAME:PASSWORD@10.69.25.16:554/stream1
          roles:
            - detect
            - rtmp
    motion:
      mask:
        - 812,27,1202,117,1212,84,820,0
    live:
      height: 1296

  kitchen:
    ffmpeg:
      inputs:
        - path: rtsp://USERNAME:PASSWORD@10.69.25.15:554/stream1
          roles:
            - detect
            - rtmp
    live:
      height: 1296

detectors:
  coral:
    type: edgetpu
    device: usb

Relevant log output

https://pastebin.com/A9Ji603N Full log since github says that its too long

FFprobe output from your camera

Carport-front:

root@b6076ad9ed20:/opt/frigate# ffprobe rtsp://USERNAME:PASSWORD@10.69.25.10:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
[1] 4005
root@b6076ad9ed20:/opt/frigate# ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[rtsp @ 0x562dced12b80] max delay reached. need to consume packet
[rtsp @ 0x562dced12b80] RTP: missed 67 packets
[h264 @ 0x562dced16a80] error while decoding MB 64 66, bytestream -17
[h264 @ 0x562dced16a80] concealing 225 DC, 225 AC, 225 MV errors in I frame
[h264 @ 0x562dced16a80] Increasing reorder buffer to 1
[rtsp @ 0x562dced12b80] max delay reached. need to consume packet
[rtsp @ 0x562dced12b80] RTP: missed 26 packets
Input #0, rtsp, from 'rtsp://USERNAME:PASSWORD@10.69.25.10:554/Streaming/Channels/101?transportmode=unicast':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.080000, bitrate: N/A
    Stream #0:0: Video: h264, yuvj420p(pc, bt709, progressive), 1920x1080, 25 tbr, 90k tbn, 180k tbc

Garden:

root@b6076ad9ed20:/opt/frigate# ffprobe rtsp://USERNAME:PASSWORD@10.69.25.11:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
[1] 4392
root@b6076ad9ed20:/opt/frigate# ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, rtsp, from 'rtsp://USERNAME:PASSWORD@10.69.25.11:554/Streaming/Channels/101?transportmode=unicast':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.400333, bitrate: N/A
    Stream #0:0: Video: h264, yuvj420p(pc, bt709, progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc

Left:

root@b6076ad9ed20:/opt/frigate# ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, rtsp, from 'rtsp://USERNAME:PASSWORD@10.69.25.12:554/Streaming/Channels/101?transportmode=unicast':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.399333, bitrate: N/A
    Stream #0:0: Video: h264, yuvj420p(pc, bt709, progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc

Right:

root@b6076ad9ed20:/opt/frigate# ffprobe rtsp://USERNAME:PASSWORD@10.69.25.13:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
[1] 4920
root@b6076ad9ed20:/opt/frigate# ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 1 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 1 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 1 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 7 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 2 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 3 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 1 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 1 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 10 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 1 packets
[rtsp @ 0x558650c58b80] max delay reached. need to consume packet
[rtsp @ 0x558650c58b80] RTP: missed 2 packets
Input #0, rtsp, from 'rtsp://USERNAME:PASSWORD@10.69.25.13:554/Streaming/Channels/101?transportmode=unicast':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.466333, bitrate: N/A
    Stream #0:0: Video: h264, yuvj420p(pc, bt709, progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc

Back:

root@b6076ad9ed20:/opt/frigate# ffprobe rtsp://USERNAME:PASSWORD@10.69.25.14:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
[1] 5099
root@b6076ad9ed20:/opt/frigate# ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, rtsp, from 'rtsp://USERNAME:PASSWORD@10.69.25.14:554/Streaming/Channels/101?transportmode=unicast':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.400333, bitrate: N/A
    Stream #0:0: Video: h264, yuvj420p(pc, bt709, progressive), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc

Foyer:

root@b6076ad9ed20:/opt/frigate# ffprobe rtsp://USERNAME:PASSWORD@10.69.25.16:554/stream1
ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, rtsp, from 'rtsp://USERNAME:PASSWORD@10.69.25.16:554/stream1':
  Metadata:
    title           : Session streamed by "TP-LINK RTSP Server"
  Duration: N/A, start: 0.334333, bitrate: N/A
    Stream #0:0: Video: h264, yuv420p(progressive), 2304x1296, 15 fps, 25 tbr, 90k tbn, 30 tbc

Kitchen:

root@b6076ad9ed20:/opt/frigate# ffprobe rtsp://USERNAME:PASSWORD@10.69.25.15:554/stream1
ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, rtsp, from 'rtsp://USERNAME:PASSWORD@10.69.25.15:554/stream1':
  Metadata:
    title           : Session streamed by "TP-LINK RTSP Server"
  Duration: N/A, start: 0.316667, bitrate: N/A
    Stream #0:0: Video: h264, yuv420p(progressive), 2304x1296, 12 fps, 25 tbr, 90k tbn, 24 tbc

Frigate stats

Where is the /api/stats at? or what command do I run for the output?

Operating system

Debian

Install method

Docker Compose

Coral version

USB

Network connection

Wired

Camera make and model

Hikvision DS-2CD1023G0E-I(L), TP-Link VIGI C400HP

Any other information that may be helpful

No response