question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Support]: You may have invalid args defined for this camera.

See original GitHub issue

Describe the problem you are having

I have two identical cameras with the exact same settings but one always seem to give me errors (already replaced it to rule out hardware).

Version

0.9.4

Frigate config file

mqtt:
host: 192.168.141.21
user: REDACTED
password: REDACTED

database:
path: /db/frigate.db

detectors:
  coral:
    type: edgetpu
    device: usb

# Optional: birdseye configuration
birdseye:
enabled: True
width: 1920
height: 1080
quality: 8
mode: motion

record:
enabled: True
retain_days: 0
events:
  max_seconds: 240
  pre_capture: 5
  post_capture: 5

cameras:
driveway_cam:
  objects:
    track:
      - person
      - car  
  ffmpeg:
    inputs:
      - path: rtsp://REDACTED:REDACTED@192.168.141.14:554/cam/realmonitor?channel=1&subtype=0
        # Required: list of roles for this stream. valid values are: detect,record,rtmp
        roles:
          - detect
          - rtmp
          - record

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

  record:
    events:
      required_zones:
        - street_driveway
        - main_driveway

  snapshots:
    required_zones:
      - street_driveway
      - main_driveway

  zones:
    street_driveway:
      coordinates: 1846,759,1812,842,1370,681,1475,637
      objects:
        - person
        - car
    main_driveway:
      coordinates: 1463,1080,1173,931,1065,586,1831,873,1744,1080
      objects:
        - person
        # - car

  motion:
    mask:
      - 1005,606,1177,832,476,1080,397,768
      - 1920,0,1920,739,933,490,683,0
      - 0,246,228,248,261,726,0,782

backyard_cam:
  objects:
    track:
      - person
      - cat
      - dog
      - bear
      - mouse
  ffmpeg:
    inputs:
      - path: rtsp://REDACTED:REDACTED@192.168.141.17:554/cam/realmonitor?channel=1&subtype=0
        # Required: list of roles for this stream. valid values are: detect,record,rtmp
        roles:
          - detect
          - rtmp
          - record

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

  motion:
    mask:
      - 1152,399,1920,414,1920,337,1920,0,809,0,0,0,0,546

Relevant log output

frigate    | [2021-12-24 11:35:03] frigate.app                    INFO    : Starting Frigate (0.9.4-26ae608)
frigate    | Starting migrations
frigate    | [2021-12-24 11:35:03] peewee_migrate                 INFO    : Starting migrations
frigate    | There is nothing to migrate
frigate    | [2021-12-24 11:35:03] peewee_migrate                 INFO    : There is nothing to migrate
frigate    | [2021-12-24 11:35:03] frigate.mqtt                   INFO    : MQTT connected
frigate    | [2021-12-24 11:35:03] frigate.app                    INFO    : Output process started: 217
frigate    | [2021-12-24 11:35:03] frigate.app                    INFO    : Camera processor started for driveway_cam: 220
frigate    | [2021-12-24 11:35:03] ws4py                          INFO    : Using epoll
frigate    | [2021-12-24 11:35:03] frigate.app                    INFO    : Camera processor started for backyard_cam: 221
frigate    | [2021-12-24 11:35:03] frigate.app                    INFO    : Capture process started for driveway_cam: 222
frigate    | [2021-12-24 11:35:03] frigate.app                    INFO    : Capture process started for backyard_cam: 225
frigate    | [2021-12-24 11:35:03] ws4py                          INFO    : Using epoll
frigate    | [2021-12-24 11:35:03] detector.coral                 INFO    : Starting detection process: 216
frigate    | [2021-12-24 11:35:03] frigate.edgetpu                INFO    : Attempting to load TPU as usb
frigate    | [2021-12-24 11:35:05] frigate.edgetpu                INFO    : TPU found
frigate    | [2021-12-24 11:35:21] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:21] frigate.video                  INFO    : backyard_cam: ffmpeg process is not running. exiting capture thread...
frigate    | [2021-12-24 11:35:23] watchdog.backyard_cam          ERROR   : FFMPEG process crashed unexpectedly for backyard_cam.
frigate    | [2021-12-24 11:35:23] watchdog.backyard_cam          ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
frigate    | [2021-12-24 11:35:23] watchdog.backyard_cam          ERROR   : You may have invalid args defined for this camera.
frigate    | [2021-12-24 11:35:23] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x55d5557a0100] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:35:23] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x55d5557ae840] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:35:23] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x55d5557a0100] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
frigate    | [2021-12-24 11:35:23] ffmpeg.backyard_cam.detect     ERROR   : av_interleaved_write_frame(): Broken pipe
frigate    | [2021-12-24 11:35:23] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x55d5557ae840] Failed to update header with correct duration.
frigate    | [2021-12-24 11:35:23] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x55d5557ae840] Failed to update header with correct filesize.
frigate    | [2021-12-24 11:35:23] ffmpeg.backyard_cam.detect     ERROR   : Error writing trailer of rtmp://127.0.0.1/live/backyard_cam: Broken pipe
frigate    | [2021-12-24 11:35:33] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:33] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:33] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:33] frigate.video                  INFO    : backyard_cam: ffmpeg process is not running. exiting capture thread...
frigate    | [2021-12-24 11:35:43] watchdog.backyard_cam          ERROR   : FFMPEG process crashed unexpectedly for backyard_cam.
frigate    | [2021-12-24 11:35:43] watchdog.backyard_cam          ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
frigate    | [2021-12-24 11:35:43] watchdog.backyard_cam          ERROR   : You may have invalid args defined for this camera.
frigate    | [2021-12-24 11:35:43] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x5600d2043100] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:35:43] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x5600d204f440] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:35:43] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x5600d2043100] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
frigate    | [2021-12-24 11:35:43] ffmpeg.backyard_cam.detect     ERROR   : av_interleaved_write_frame(): Connection reset by peer
frigate    | [2021-12-24 11:35:43] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x5600d204f440] Failed to update header with correct duration.
frigate    | [2021-12-24 11:35:43] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x5600d204f440] Failed to update header with correct filesize.
frigate    | [2021-12-24 11:35:43] ffmpeg.backyard_cam.detect     ERROR   : Error writing trailer of rtmp://127.0.0.1/live/backyard_cam: Connection reset by peer
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:35:55] frigate.video                  INFO    : backyard_cam: ffmpeg process is not running. exiting capture thread...
frigate    | [2021-12-24 11:36:03] watchdog.backyard_cam          ERROR   : FFMPEG process crashed unexpectedly for backyard_cam.
frigate    | [2021-12-24 11:36:03] watchdog.backyard_cam          ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
frigate    | [2021-12-24 11:36:03] watchdog.backyard_cam          ERROR   : You may have invalid args defined for this camera.
frigate    | [2021-12-24 11:36:03] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x557eb0eba100] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:36:03] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x557eb0ec8840] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:36:03] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x557eb0eba100] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
frigate    | [2021-12-24 11:36:03] ffmpeg.backyard_cam.detect     ERROR   : av_interleaved_write_frame(): Broken pipe
frigate    | [2021-12-24 11:36:03] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x557eb0ec8840] Failed to update header with correct duration.
frigate    | [2021-12-24 11:36:03] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x557eb0ec8840] Failed to update header with correct filesize.
frigate    | [2021-12-24 11:36:03] ffmpeg.backyard_cam.detect     ERROR   : Error writing trailer of rtmp://127.0.0.1/live/backyard_cam: Broken pipe
frigate    | [2021-12-24 11:36:15] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:36:15] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:36:15] frigate.video                  INFO    : backyard_cam: ffmpeg process is not running. exiting capture thread...
frigate    | [2021-12-24 11:36:23] watchdog.backyard_cam          ERROR   : FFMPEG process crashed unexpectedly for backyard_cam.
frigate    | [2021-12-24 11:36:23] watchdog.backyard_cam          ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
frigate    | [2021-12-24 11:36:23] watchdog.backyard_cam          ERROR   : You may have invalid args defined for this camera.
frigate    | [2021-12-24 11:36:23] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x5600d49b9100] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:36:23] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x5600d49c5440] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:36:23] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x5600d49b9100] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
frigate    | [2021-12-24 11:36:23] ffmpeg.backyard_cam.detect     ERROR   : av_interleaved_write_frame(): Connection reset by peer
frigate    | [2021-12-24 11:36:23] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x5600d49c5440] Failed to update header with correct duration.
frigate    | [2021-12-24 11:36:23] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x5600d49c5440] Failed to update header with correct filesize.
frigate    | [2021-12-24 11:36:23] ffmpeg.backyard_cam.detect     ERROR   : Error writing trailer of rtmp://127.0.0.1/live/backyard_cam: Connection reset by peer
frigate    | [2021-12-24 11:36:37] frigate.video                  INFO    : backyard_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate    | [2021-12-24 11:36:37] frigate.video                  INFO    : backyard_cam: ffmpeg process is not running. exiting capture thread...
frigate    | [2021-12-24 11:36:43] watchdog.backyard_cam          ERROR   : FFMPEG process crashed unexpectedly for backyard_cam.
frigate    | [2021-12-24 11:36:43] watchdog.backyard_cam          ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
frigate    | [2021-12-24 11:36:43] watchdog.backyard_cam          ERROR   : You may have invalid args defined for this camera.
frigate    | [2021-12-24 11:36:43] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x5591d436a100] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:36:43] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x5591d4378840] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frigate    | [2021-12-24 11:36:43] ffmpeg.backyard_cam.detect     ERROR   : [segment @ 0x5591d436a100] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
frigate    | [2021-12-24 11:36:43] ffmpeg.backyard_cam.detect     ERROR   : av_interleaved_write_frame(): Connection reset by peer
frigate    | [2021-12-24 11:36:43] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x5591d4378840] Failed to update header with correct duration.
frigate    | [2021-12-24 11:36:43] ffmpeg.backyard_cam.detect     ERROR   : [flv @ 0x5591d4378840] Failed to update header with correct filesize.
frigate    | [2021-12-24 11:36:43] ffmpeg.backyard_cam.detect     ERROR   : Error writing trailer of rtmp://127.0.0.1/live/backyard_cam: Connection reset by peer

FFprobe output from your camera

Not sure how to perform.

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

USB

Network connection

Wired

Camera make and model

Amcrest IP8M-2496

Any other information that may be helpful

Again, exact same cameras with exact same configuration on both. Only one errors out.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
blakeblackshearcommented, Dec 28, 2021

It may happen occasionally and frigate should recover automatically. As long as it’s not happening often, it shouldn’t cause too many problems. You can also try disabling rtmp since that is less forgiving of errors in the stream.

0reactions
stale[bot]commented, Jan 29, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Local realtime person detection for RTSP cameras
HLS support for the Frigate card, for live video+audio monitoring of cameras? ... ERROR : You may have invalid args defined for this...
Read more >
Camera Specific Configurations - Frigate Docs
The input and output parameters need to be adjusted for MJPEG cameras. input_args: -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict ...
Read more >
Camera.Parameters | Android Developers
We recommend using the new android.hardware.camera2 API for new applications. Camera service settings. To make camera parameters take effect, ...
Read more >
Wyze cam v3 and frigate getting errors. : r/homeassistant
There is nothing wrong with your args. The logs clearly state that the camera is refusing the connection from frigate. This can happen...
Read more >
[SUPPORT] blakeblackshear - Frigate - Page 12
garage_driveway ERROR : You may have invalid args defined for this camera. [2021-11-20 16:48:56] ffmpeg.garage_driveway.detect ERROR : [rtsp @ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found