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

[Support]: Unable to get Reolink camera to work using provided configuration #1974

Closed
Bigsam411 opened this issue Oct 10, 2021 · 4 comments
Closed

Comments

@Bigsam411
Copy link

Bigsam411 commented Oct 10, 2021

Describe the problem you are having

I was using the previous version of Frigate and my Reolink 410 cameras were kind of working. After several hours I was starting to get problems. That's not why I am here though I was just pointing out that I never really got them to work properly. That said I basically started from scratch with the latest version (0.9.1-800f33e).

I followed the config file recommended here: #1713 (comment) and now I am getting all sorts of errors. I am only trying to get 1 camera working right now but I have up to 7 more I will be hooking up,

I am running on Unraid docker with a Google Coral edge USB TPU. My current recording path is on an unassigned drive that I will one day replace with a dedicated Surveillance grade drive.

Version

0.9.1-800f33e

Frigate config file

mqtt:
  host: IP of Server
  port: 1883
 
detectors:
  coral:
    type: edgetpu
    device: usb
cameras:
  Front_of_House_West:
    ffmpeg:
      hwaccel_args:
      - -hwaccel
      - vaapi
      - -hwaccel_device
      - /dev/dri/renderD128
      - -hwaccel_output_format
      - yuv420p
      input_args:
      - -avoid_negative_ts
      - make_zero
      - -fflags
      - nobuffer+genpts+discardcorrupt
      - -flags
      - low_delay
      - -strict
      - experimental
      - -analyzeduration
      - 1000M
      - -probesize
      - 1000M
      - -rw_timeout
      - "5000000"
      inputs:
        - path: http://IP of Camera/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=Frigate&password=Password
          roles:
            - record
            - rtmp
        - path: http://IP of Camera/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=Frigate&password=Password
          roles:
            - detect
      output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    detect:
      width: 640
      height: 480
      fps: 7
    record:
      enabled: True
      retain_days: 0
      events:
        retain:
          default: 10

Relevant log output

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[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-09 20:48:04] frigate.app INFO : Starting Frigate (0.9.1-800f33e)
Starting migrations
[2021-10-09 20:48:04] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2021-10-09 20:48:07] peewee_migrate INFO : There is nothing to migrate
[2021-10-09 20:48:07] frigate.mqtt INFO : MQTT connected
[2021-10-09 20:48:07] detector.coral INFO : Starting detection process: 272
[2021-10-09 20:48:07] frigate.app INFO : Output process started: 274
[2021-10-09 20:48:07] frigate.app INFO : Camera processor started for Front_of_House_West: 276
[2021-10-09 20:48:07] ws4py INFO : Using epoll
[2021-10-09 20:48:07] frigate.app INFO : Capture process started for Front_of_House_West: 279
[2021-10-09 20:48:07] frigate.edgetpu INFO : Attempting to load TPU as usb
[2021-10-09 20:48:07] ws4py INFO : Using epoll
[2021-10-09 20:48:07] frigate.video INFO : Front_of_House_West: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-09 20:48:07] frigate.video INFO : Front_of_House_West: ffmpeg process is not running. exiting capture thread...
[2021-10-09 20:48:09] frigate.edgetpu INFO : TPU found
[2021-10-09 20:48:27] watchdog.Front_of_House_West ERROR : FFMPEG process crashed unexpectedly for Front_of_House_West.

[2021-10-09 20:48:27] watchdog.Front_of_House_West ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2021-10-09 20:48:27] watchdog.Front_of_House_West ERROR : You may have invalid args defined for this camera.

[2021-10-09 20:48:27] ffmpeg.Front_of_House_West.detect ERROR : http://IP OF Camera/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=Frigate&password=Password: End of file

[2021-10-09 20:48:27] ffmpeg.Front_of_House_West.record_rtmp ERROR : http://IP OF Camera/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=Frigate&password=Password: End of file

[2021-10-09 20:48:27] watchdog.Front_of_House_West INFO : Terminating the existing ffmpeg process...
[2021-10-09 20:48:27] watchdog.Front_of_House_West INFO : Waiting for ffmpeg to exit gracefully...
[2021-10-09 20:48:27] frigate.video INFO : Front_of_House_West: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-09 20:48:27] frigate.video INFO : Front_of_House_West: ffmpeg process is not running. exiting capture thread...
[2021-10-09 20:48:37] watchdog.Front_of_House_West ERROR : FFMPEG process crashed unexpectedly for Front_of_House_West.

[2021-10-09 20:48:37] watchdog.Front_of_House_West ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2021-10-09 20:48:37] watchdog.Front_of_House_West ERROR : You may have invalid args defined for this camera.

[2021-10-09 20:48:37] ffmpeg.Front_of_House_West.detect ERROR : http://IP OF Camera/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=Frigate&password=Password: End of file

[2021-10-09 20:48:37] ffmpeg.Front_of_House_West.record_rtmp ERROR : http://IP OF Camera/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=Frigate&password=Password: End of file

[2021-10-09 20:48:37] watchdog.Front_of_House_West INFO : Terminating the existing ffmpeg process...
[2021-10-09 20:48:37] watchdog.Front_of_House_West INFO : Waiting for ffmpeg to exit gracefully...
[2021-10-09 20:48:37] frigate.video INFO : Front_of_House_West: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-09 20:48:37] frigate.video INFO : Front_of_House_West: ffmpeg process is not running. exiting capture thread...
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

FFprobe output from your camera

I tried this but couldnt get it to work.

Frigate stats

{
  "birdseye": {
    "enabled": true,
    "height": 720,
    "mode": "objects",
    "quality": 8,
    "width": 1280
  },
  "cameras": {
    "Front_of_House_West": {
      "best_image_timeout": 60,
      "detect": {
        "enabled": true,
        "fps": 7,
        "height": 480,
        "max_disappeared": 35,
        "width": 640
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [
          "-hwaccel",
          "vaapi",
          "-hwaccel_device",
          "/dev/dri/renderD128",
          "-hwaccel_output_format",
          "yuv420p"
        ],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "nobuffer+genpts+discardcorrupt",
          "-flags",
          "low_delay",
          "-strict",
          "experimental",
          "-analyzeduration",
          "1000M",
          "-probesize",
          "1000M",
          "-rw_timeout",
          "5000000"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "http://192.168.1.44/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=Frigate&password=ipCGmu!z8!Ppl%5PBi!3",
            "roles": [
              "record",
              "rtmp"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "http://192.168.1.44/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=Frigate&password=ipCGmu!z8!Ppl%5PBi!3",
            "roles": [
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": "-f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy",
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags nobuffer+genpts+discardcorrupt -flags low_delay -strict experimental -analyzeduration 1000M -probesize 1000M -rw_timeout 5000000 -i http://192.168.1.44/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=Frigate&password=ipCGmu!z8!Ppl%5PBi!3 -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy /tmp/cache/Front_of_House_West-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/Front_of_House_West",
          "roles": [
            "record",
            "rtmp"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags nobuffer+genpts+discardcorrupt -flags low_delay -strict experimental -analyzeduration 1000M -probesize 1000M -rw_timeout 5000000 -i http://192.168.1.44/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=Frigate&password=ipCGmu!z8!Ppl%5PBi!3 -r 7 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 74,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 180,
        "mask": "",
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "Front_of_House_West",
      "objects": {
        "filters": {
          "person": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "max_seconds": 300,
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 10,
            "objects": {}
          }
        },
        "retain_days": 0
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": false,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {}
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "zones": {}
    }
  },
  "database": {
    "path": "/media/frigate/frigate.db"
  },
  "detect": {
    "enabled": true,
    "fps": 5,
    "height": 720,
    "max_disappeared": null,
    "width": 1280
  },
  "detectors": {
    "coral": {
      "device": "usb",
      "num_threads": 3,
      "type": "edgetpu"
    }
  },
  "environment_vars": {},
  "ffmpeg": {
    "global_args": [
      "-hide_banner",
      "-loglevel",
      "warning"
    ],
    "hwaccel_args": [],
    "input_args": [
      "-avoid_negative_ts",
      "make_zero",
      "-fflags",
      "+genpts+discardcorrupt",
      "-rtsp_transport",
      "tcp",
      "-stimeout",
      "5000000",
      "-use_wallclock_as_timestamps",
      "1"
    ],
    "output_args": {
      "detect": [
        "-f",
        "rawvideo",
        "-pix_fmt",
        "yuv420p"
      ],
      "record": [
        "-f",
        "segment",
        "-segment_time",
        "10",
        "-segment_format",
        "mp4",
        "-reset_timestamps",
        "1",
        "-strftime",
        "1",
        "-c",
        "copy",
        "-an"
      ],
      "rtmp": [
        "-c",
        "copy",
        "-f",
        "flv"
      ]
    }
  },
  "live": {
    "height": 720,
    "quality": 8
  },
  "logger": {
    "default": "info",
    "logs": {}
  },
  "model": {
    "height": 320,
    "labelmap": {},
    "labelmap_path": null,
    "path": null,
    "width": 320
  },
  "motion": null,
  "mqtt": {
    "client_id": "frigate",
    "host": "192.168.1.23",
    "password": null,
    "port": 1883,
    "stats_interval": 60,
    "tls_ca_certs": null,
    "tls_client_cert": null,
    "tls_client_key": null,
    "tls_insecure": null,
    "topic_prefix": "frigate",
    "user": null
  },
  "objects": {
    "filters": null,
    "mask": "",
    "track": [
      "person"
    ]
  },
  "record": {
    "enabled": false,
    "events": {
      "max_seconds": 300,
      "objects": null,
      "post_capture": 5,
      "pre_capture": 5,
      "required_zones": [],
      "retain": {
        "default": 10,
        "objects": {}
      }
    },
    "retain_days": 0
  },
  "rtmp": {
    "enabled": true
  },
  "snapshots": {
    "bounding_box": true,
    "clean_copy": true,
    "crop": false,
    "enabled": false,
    "height": null,
    "quality": 70,
    "required_zones": [],
    "retain": {
      "default": 10,
      "objects": {}
    },
    "timestamp": false
  },
  "timestamp_style": {
    "color": {
      "blue": 255,
      "green": 255,
      "red": 255
    },
    "effect": null,
    "format": "%m/%d/%Y %H:%M:%S",
    "position": "tl",
    "thickness": 2
  }
}

Operating system

UNRAID

Install method

Docker Compose

Coral version

USB

Network connection

Wired

Camera make and model

Reolink 410

Any other information that may be helpful

No response

@blakeblackshear
Copy link
Owner

Can you try with a simpler password?

@Bigsam411
Copy link
Author

Bigsam411 commented Oct 10, 2021

So I went to a much smaller password without symbols and this is what I got in the log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[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-10 10:31:46] frigate.app INFO : Starting Frigate (0.9.1-800f33e)
Starting migrations
[2021-10-10 10:31:46] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2021-10-10 10:31:46] peewee_migrate INFO : There is nothing to migrate
[2021-10-10 10:31:48] frigate.mqtt INFO : MQTT connected
[2021-10-10 10:31:48] detector.coral INFO : Starting detection process: 273
[2021-10-10 10:31:48] frigate.edgetpu INFO : Attempting to load TPU as usb
[2021-10-10 10:31:48] ws4py INFO : Using epoll
[2021-10-10 10:31:50] frigate.video INFO : Front_of_House_West: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-10 10:31:48] frigate.app INFO : Output process started: 275
[2021-10-10 10:31:51] frigate.edgetpu INFO : TPU found
[2021-10-10 10:31:50] frigate.video INFO : Front_of_House_West: ffmpeg process is not running. exiting capture thread...
[2021-10-10 10:31:48] frigate.app INFO : Camera processor started for Front_of_House_West: 278
[2021-10-10 10:31:48] frigate.app INFO : Capture process started for Front_of_House_West: 282
[2021-10-10 10:31:48] ws4py INFO : Using epoll
[2021-10-10 10:32:08] watchdog.Front_of_House_West ERROR : FFMPEG process crashed unexpectedly for Front_of_House_West.

[2021-10-10 10:32:08] watchdog.Front_of_House_West ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2021-10-10 10:32:08] watchdog.Front_of_House_West ERROR : You may have invalid args defined for this camera.

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : [AVHWDeviceContext @ 0x55a937ca3880] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : [AVHWDeviceContext @ 0x55a937ca3880] Failed to initialise VAAPI connection: -1 (unknown libva error).

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : Device creation failed: -5.

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : [h264 @ 0x55a937ca6d80] No device available for decoder: device type vaapi needed for codec h264.

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : Device setup failed for decoder on input stream #0:0 : Input/output error

[2021-10-10 10:32:08] watchdog.Front_of_House_West ERROR : FFMPEG process crashed unexpectedly for Front_of_House_West.

[2021-10-10 10:32:08] watchdog.Front_of_House_West ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2021-10-10 10:32:08] watchdog.Front_of_House_West ERROR : You may have invalid args defined for this camera.

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : [AVHWDeviceContext @ 0x55a937ca3880] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : [AVHWDeviceContext @ 0x55a937ca3880] Failed to initialise VAAPI connection: -1 (unknown libva error).

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : Device creation failed: -5.

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : [h264 @ 0x55a937ca6d80] No device available for decoder: device type vaapi needed for codec h264.

[2021-10-10 10:32:08] ffmpeg.Front_of_House_West.detect ERROR : Device setup failed for decoder on input stream #0:0 : Input/output error

[2021-10-10 10:32:11] frigate.video INFO : Front_of_House_West: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-10 10:32:11] frigate.video INFO : Front_of_House_West: ffmpeg process is not running. exiting capture thread...
[2021-10-10 10:32:18] watchdog.Front_of_House_West ERROR : FFMPEG process crashed unexpectedly for Front_of_House_West.

[2021-10-10 10:32:18] watchdog.Front_of_House_West ERROR : The following ffmpeg logs include the last 100 lines prior to exit.

[2021-10-10 10:32:18] watchdog.Front_of_House_West ERROR : You may have invalid args defined for this camera.

[2021-10-10 10:32:18] ffmpeg.Front_of_House_West.detect ERROR : [AVHWDeviceContext @ 0x55c325eba200] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed

[2021-10-10 10:32:18] ffmpeg.Front_of_House_West.detect ERROR : [AVHWDeviceContext @ 0x55c325eba200] Failed to initialise VAAPI connection: -1 (unknown libva error).

[2021-10-10 10:32:18] ffmpeg.Front_of_House_West.detect ERROR : Device creation failed: -5.

[2021-10-10 10:32:18] ffmpeg.Front_of_House_West.detect ERROR : [h264 @ 0x55c325ebf240] No device available for decoder: device type vaapi needed for codec h264.

[2021-10-10 10:32:18] ffmpeg.Front_of_House_West.detect ERROR : Device setup failed for decoder on input stream #0:0 : Input/output error

[2021-10-10 10:32:21] frigate.video INFO : Front_of_House_West: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-10 10:32:21] frigate.video INFO : Front_of_House_West: ffmpeg process is not running. exiting capture thread...
[2021-10-10 10:32:21] frigate.video INFO : Front_of_House_West: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2021-10-10 10:32:21] frigate.video INFO : Front_of_House_West: ffmpeg process is not running. exiting capture thread...
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting

@blakeblackshear
Copy link
Owner

FFMpeg is complaining that it can't access your device for hardware acceleration. See if it works with those removed.

@Bigsam411
Copy link
Author

That did it. I guess it was the complicated password with several symbols throwing off things at first (I almost suspected this) then the hardware acceleration arguments.

I was able to add more cameras into the configuration and they work.

Thanks

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

No branches or pull requests

2 participants