blakeblackshear / frigate

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

[Support]: FFMPEG error on restored homeassistant on hp t530 #2012

Closed ferbulous closed 3 years ago

ferbulous commented 3 years ago

Describe the problem you are having

Hi, just updated to v0.9.1 and migrated my homeassistant to t530 thin client from pi, adjusted the config as required for the latest version and I'm getting this error with ffmpeg. I'm not quite sure if there's a problem with my config since ffprobe tested all the rtsp links and they're valid

Version

0.9.1

Frigate config file

mqtt:
  host: 192.168.2.199
  user: mqttuser
  password: mqttpassword

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p
  output_args:
    # Optional: output args for detect streams (default: shown below)
    detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -codec:a aac
    # Optional: output args for rtmp streams (default: shown below)
    rtmp: -c copy -f flv

detectors:
  coral_pci:
    type: edgetpu
    device: pci

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Width of the output resolution (default: shown below)
  width: 1280
  # Optional: Height of the output resolution (default: shown below)
  height: 720
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 8
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: objects

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
    - cat

record:
  # Optional: Enable recording (default: shown below)
  enabled: False
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
  retain_days: 0
  # Optional: Event recording settings
  events:
    # Optional: Maximum length of time to retain video during long events. (default: shown below)
    # NOTE: If an object is being tracked for longer than this amount of time, the retained recordings
    #       will be the last x seconds of the event unless retain_days under record is > 0.
    max_seconds: 300
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 5
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 5
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - person
    # 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: 5
      # Optional: Per object retention days
      objects:
        person: 5

snapshots:
  # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True
  # Optional: print a timestamp on the snapshots (default: shown below)
  timestamp: False
  # Optional: draw bounding box on the snapshots (default: shown below)
  bounding_box: True
  # Optional: crop the snapshot (default: shown below)
  crop: False
  # Optional: height to resize the snapshot to (default: original size)
  height: 175
  # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
  required_zones: []
  # Optional: Camera override for retention settings (default: global values)
  retain:
    # Required: Default retention days (default: shown below)
    default: 5
    # Optional: Per object retention days
    objects:
      person: 5

cameras:
  Frontporch:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.2.148:554/ch0.h264
          roles:
            - detect
            - rtmp
    detect:
      width: 1280 
      height: 720 

  Backdoor:
    ffmpeg:
      inputs:
        - path: rtsp://user:password@192.168.2.223/Streaming/Channels/101
          roles:
            - detect
            - rtmp
    detect:
      width: 2560
      height: 1440

  Backyard:
    ffmpeg:
      inputs:
        - path: rtsp://user:password@192.168.2.224/Streaming/Channels/101
          roles:
            - detect
            - rtmp
    detect:
      width: 2560
      height: 1440

  Front Lawn:
    ffmpeg:
      inputs:
        - path: rtsp://user:password@192.168.2.225/Streaming/Channels/101
          roles:
            - detect
            - rtmp
    detect:
      width: 2560
      height: 1440

  Carporch:
    ffmpeg:
      inputs:
        - path: rtsp://user:password@192.168.2.228/Streaming/Channels/101
          roles:
            - detect
            - rtmp
    detect:
      width: 2560
      height: 1440

Relevant log output

[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2021-10-14 09:29:25] frigate.app                    INFO    : Starting Frigate (0.9.1-800f33e)
[2021-10-14 09:29:25] frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
[2021-10-14 09:29:25] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2021-10-14 09:29:25] peewee_migrate                 INFO    : There is nothing to migrate
[2021-10-14 09:29:25] frigate.mqtt                   INFO    : MQTT connected
[2021-10-14 09:29:25] frigate.app                    INFO    : Output process started: 215
[2021-10-14 09:29:25] frigate.app                    INFO    : Camera processor started for Frontporch: 218
[2021-10-14 09:29:25] ws4py                          INFO    : Using epoll
[2021-10-14 09:29:25] frigate.app                    INFO    : Camera processor started for Backdoor: 221
[2021-10-14 09:29:25] frigate.app                    INFO    : Camera processor started for Backyard: 226
[2021-10-14 09:29:25] detector.coral_pci             INFO    : Starting detection process: 214
[2021-10-14 09:29:25] frigate.edgetpu                INFO    : Attempting to load TPU as pci
[2021-10-14 09:29:25] frigate.app                    INFO    : Camera processor started for Front Lawn: 240
[2021-10-14 09:29:25] frigate.edgetpu                INFO    : TPU found
[2021-10-14 09:29:25] frigate.app                    INFO    : Camera processor started for Carporch: 243
[2021-10-14 09:29:25] frigate.app                    INFO    : Capture process started for Frontporch: 245
[2021-10-14 09:29:25] frigate.app                    INFO    : Capture process started for Backdoor: 251
[2021-10-14 09:29:25] frigate.app                    INFO    : Capture process started for Backyard: 254
[2021-10-14 09:29:25] frigate.app                    INFO    : Capture process started for Front Lawn: 261
[2021-10-14 09:29:25] frigate.app                    INFO    : Capture process started for Carporch: 268
[2021-10-14 09:29:25] ws4py                          INFO    : Using epoll
[2021-10-14 09:29:27] frigate.video                  INFO    : Carporch: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:27] frigate.video                  INFO    : Carporch: ffmpeg process is not running. exiting capture thread...
[2021-10-14 09:29:27] frigate.video                  INFO    : Backdoor: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:27] frigate.video                  INFO    : Backdoor: ffmpeg process is not running. exiting capture thread...
[2021-10-14 09:29:27] frigate.video                  INFO    : Front Lawn: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:27] frigate.video                  INFO    : Front Lawn: ffmpeg process is not running. exiting capture thread...
[2021-10-14 09:29:27] frigate.video                  INFO    : Frontporch: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:27] frigate.video                  INFO    : Frontporch: ffmpeg process is not running. exiting capture thread...
[2021-10-14 09:29:29] frigate.video                  INFO    : Backyard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:29] frigate.video                  INFO    : Backyard: ffmpeg process is not running. exiting capture thread...
[2021-10-14 09:29:45] watchdog.Frontporch            ERROR   : FFMPEG process crashed unexpectedly for Frontporch.
[2021-10-14 09:29:45] watchdog.Frontporch            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2021-10-14 09:29:45] watchdog.Frontporch            ERROR   : You may have invalid args defined for this camera.
[2021-10-14 09:29:45] ffmpeg.Frontporch.detect       ERROR   : [AVHWDeviceContext @ 0x555bf0c6d700] No VA display found for device /dev/dri/renderD128.
[2021-10-14 09:29:45] ffmpeg.Frontporch.detect       ERROR   : Device creation failed: -22.
[2021-10-14 09:29:45] ffmpeg.Frontporch.detect       ERROR   : [h264 @ 0x555bf0c44080] No device available for decoder: device type vaapi needed for codec h264.
[2021-10-14 09:29:45] ffmpeg.Frontporch.detect       ERROR   : Device setup failed for decoder on input stream #0:0 : Invalid argument
[2021-10-14 09:29:45] watchdog.Backdoor              ERROR   : FFMPEG process crashed unexpectedly for Backdoor.
[2021-10-14 09:29:45] watchdog.Backdoor              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2021-10-14 09:29:45] watchdog.Backdoor              ERROR   : You may have invalid args defined for this camera.
[2021-10-14 09:29:45] ffmpeg.Backdoor.detect         ERROR   : [AVHWDeviceContext @ 0x55c585d90a40] No VA display found for device /dev/dri/renderD128.
[2021-10-14 09:29:45] ffmpeg.Backdoor.detect         ERROR   : Device creation failed: -22.
[2021-10-14 09:29:45] ffmpeg.Backdoor.detect         ERROR   : [h264 @ 0x55c585d07640] No device available for decoder: device type vaapi needed for codec h264.
[2021-10-14 09:29:45] ffmpeg.Backdoor.detect         ERROR   : Device setup failed for decoder on input stream #0:0 : Invalid argument
[2021-10-14 09:29:45] watchdog.Backyard              ERROR   : FFMPEG process crashed unexpectedly for Backyard.
[2021-10-14 09:29:45] watchdog.Backyard              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2021-10-14 09:29:45] watchdog.Backyard              ERROR   : You may have invalid args defined for this camera.
[2021-10-14 09:29:45] ffmpeg.Backyard.detect         ERROR   : Guessed Channel Layout for Input Stream #0.1 : mono
[2021-10-14 09:29:45] ffmpeg.Backyard.detect         ERROR   : [AVHWDeviceContext @ 0x56315aaec740] No VA display found for device /dev/dri/renderD128.
[2021-10-14 09:29:45] ffmpeg.Backyard.detect         ERROR   : Device creation failed: -22.
[2021-10-14 09:29:45] ffmpeg.Backyard.detect         ERROR   : [h264 @ 0x56315a981d00] No device available for decoder: device type vaapi needed for codec h264.
[2021-10-14 09:29:45] ffmpeg.Backyard.detect         ERROR   : Device setup failed for decoder on input stream #0:0 : Invalid argument
[2021-10-14 09:29:45] watchdog.Carporch              ERROR   : FFMPEG process crashed unexpectedly for Carporch.
[2021-10-14 09:29:45] watchdog.Carporch              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2021-10-14 09:29:45] watchdog.Carporch              ERROR   : You may have invalid args defined for this camera.
[2021-10-14 09:29:45] ffmpeg.Carporch.detect         ERROR   : Guessed Channel Layout for Input Stream #0.1 : mono
[2021-10-14 09:29:45] ffmpeg.Carporch.detect         ERROR   : [AVHWDeviceContext @ 0x5622a9a7e1c0] No VA display found for device /dev/dri/renderD128.
[2021-10-14 09:29:45] ffmpeg.Carporch.detect         ERROR   : Device creation failed: -22.
[2021-10-14 09:29:45] ffmpeg.Carporch.detect         ERROR   : [h264 @ 0x5622a98f78c0] No device available for decoder: device type vaapi needed for codec h264.
[2021-10-14 09:29:45] ffmpeg.Carporch.detect         ERROR   : Device setup failed for decoder on input stream #0:0 : Invalid argument
[2021-10-14 09:29:45] watchdog.Front Lawn            ERROR   : FFMPEG process crashed unexpectedly for Front Lawn.
[2021-10-14 09:29:45] watchdog.Front Lawn            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2021-10-14 09:29:45] watchdog.Front Lawn            ERROR   : You may have invalid args defined for this camera.
[2021-10-14 09:29:45] ffmpeg.Front Lawn.detect       ERROR   : Guessed Channel Layout for Input Stream #0.1 : mono
[2021-10-14 09:29:45] ffmpeg.Front Lawn.detect       ERROR   : [rtmp @ 0x56042a3fd600] Detected librtmp style URL parameters, these aren't supported by the libavformat internal RTMP handler currently enabled. See the documentation for the correct way to pass parameters.
[2021-10-14 09:29:45] ffmpeg.Front Lawn.detect       ERROR   : [AVHWDeviceContext @ 0x56042a3dd480] No VA display found for device /dev/dri/renderD128.
[2021-10-14 09:29:45] ffmpeg.Front Lawn.detect       ERROR   : Device creation failed: -22.
[2021-10-14 09:29:45] ffmpeg.Front Lawn.detect       ERROR   : [h264 @ 0x56042a3f6ac0] No device available for decoder: device type vaapi needed for codec h264.
[2021-10-14 09:29:45] ffmpeg.Front Lawn.detect       ERROR   : Device setup failed for decoder on input stream #0:0 : Invalid argument
[2021-10-14 09:29:46] frigate.video                  INFO    : Frontporch: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:46] frigate.video                  INFO    : Frontporch: ffmpeg process is not running. exiting capture thread...
[2021-10-14 09:29:47] frigate.video                  INFO    : Backdoor: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:47] frigate.video                  INFO    : Backdoor: ffmpeg process is not running. exiting capture thread...
[2021-10-14 09:29:47] frigate.video                  INFO    : Carporch: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:47] frigate.video                  INFO    : Carporch: ffmpeg process is not running. exiting capture thread...
[2021-10-14 09:29:47] frigate.video                  INFO    : Front Lawn: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:47] frigate.video                  INFO    : Front Lawn: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:47] frigate.video                  INFO    : Front Lawn: ffmpeg process is not running. exiting capture thread...
[2021-10-14 09:29:48] frigate.video                  INFO    : Backyard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-14 09:29:48] frigate.video                  INFO    : Backyard: ffmpeg process is not running. exiting capture thread...

FFprobe output from your camera

#hikvision camera
root@t530:/home/ferbulous# ffprobe rtsp://user:password@192.168.2.223/Streaming/Channels/101
ffprobe version 4.1.6-1~deb10u1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, rtsp, from 'rtsp://user:password9@192.168.2.223/Streaming/Channels/101':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.040000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 2560x1440, 25 fps, 25 tbr, 90k tbn, 180k tbc

#yi camera 720p hacked with rtsp
root@t530:/home/ferbulous# ffprobe rtsp://192.168.2.148:554/ch0.h264
ffprobe version 4.1.6-1~deb10u1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, rtsp, from 'rtsp://192.168.2.148:554/ch0.h264':
  Metadata:
    title           : H.264 Program Stream, streamed by the LIVE555 Media Server
    comment         : ch0.h264
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 20.08 fps, 20.08 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: aac (LC), 8000 Hz, stereo, fltp

Frigate stats

No response

Operating system

Debian

Install method

HassOS Addon

Coral version

PCIe

Network connection

Wired

Camera make and model

Hikvision, and hacked yicam 720p

Any other information that may be helpful

Moved homeasssitant to thin client t530 so I can install pcie coral on the motherboard.

blakeblackshear commented 3 years ago

It's not finding your hwaccel device

No VA display found for device /dev/dri/renderD128

If you remove your hwaccel args it will probably work. Not sure why it doesn't see them. Are you running supervised install on debian?

ferbulous commented 3 years ago

It's not finding your hwaccel device

No VA display found for device /dev/dri/renderD128

If you remove your hwaccel args it will probably work. Not sure why it doesn't see them. Are you running supervised install on debian?

Thanks! I forgot to change hw acceleration since it's >=10th Generation intel