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.

Describe the bug No matter what I try to change, I can’t get rid of two errors: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures and ffmpeg process is not running. exiting capture thread...

Tried 4 different cameras (Ubiqiti NVR, a cheap generic Foscam IP camera, a door video system with RTSP stream and this one in config is from octoprint from my Raspberry PI on my 3D printer. VLC plays all streams with no problems, Frigate won’t show even one. All show the same errors. I’ve double checked width, height and fps settings.

Version of frigate Current version: 1.13 (pasted from HA supervisor)

Config file Include your full config file wrapped in triple back ticks.

mqtt:
  host: core-mosquitto
  user: <redacted>
  password: <redacted>
cameras:
  octoprint:
    ffmpeg:
      inputs:
        - path: http://192.168.2.17/webcam/?action=stream
          roles:
            - detect
            - rtmp
    width: 640
    height: 480
    fps: 2

logger:
  default: debug
  logs:
    frigate.app: error


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

detectors:
    coral:
      type: edgetpu
      device: usb

Frigate container logs

 * Starting nginx nginx
   ...done.
frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
peewee_migrate                 INFO    : Starting migrations
peewee                         DEBUG   : ('CREATE TABLE IF NOT EXISTS "migratehistory" ("id" INTEGER NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "migrated_at" DATETIME NOT NULL)', [])
peewee                         DEBUG   : ('SELECT "t1"."id", "t1"."name", "t1"."migrated_at" FROM "migratehistory" AS "t1" ORDER BY "t1"."id"', [])
There is nothing to migrate
peewee_migrate                 INFO    : There is nothing to migrate
frigate.mqtt                   INFO    : MQTT connected
detector.coral                 INFO    : Starting detection process: 38
frigate.video                  INFO    : octoprint: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.edgetpu                INFO    : Attempting to load TPU as usb
frigate.video                  INFO    : octoprint: ffmpeg process is not running. exiting capture thread...
frigate.edgetpu                INFO    : TPU found
ffmpeg.octoprint.detect        ERROR   : Option stimeout not found.
frigate.http                   DEBUG   : Received mqtt message on frigate/stats.
frigate.video                  INFO    : octoprint: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : octoprint: ffmpeg process is not running. exiting capture thread...
ffmpeg.octoprint.detect        ERROR   : Option stimeout not found.
frigate.video                  INFO    : octoprint: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : octoprint: ffmpeg process is not running. exiting capture thread...

Frigate stats

Can't access console, Running HA OS.

FFprobe from your camera

Run the following command and paste output below

Don't have a Linux machine where I could run this :(

Screenshots Green screen instead of picture, screenshot won’t help much here.

Computer Hardware

  • OS: Home Assistant OS 6.2
  • Install method: Addon
  • Virtualization: /
  • Coral Version: USB
  • Network Setup: Wired, Gbit LAN

Camera Info:

  • Manufacturer: USB camera on Raspberry PI running Octoprint
  • Model: /
  • Resolution: 640x480
  • FPS: 15

Additional context I’m running HA on Intel® NUC Kit NUC7i3BNH with 8 GB of RAM. I’ve set 512 MB RAM to video memory in BIOS, nothing changed (was 128 before). I tried searching here and on Google for this error combo, couldn’t find the same error combination. I tried without hwaccel_args, no difference. If it helps, VLC shows this as Codec info:

Codec: Motion JPEG Video (MJPG)
Video resolution: 640x480
Decoded format: Planar 4:2:2 YUV full scale
Color space: ITU-R BT.601 Range

I also tried disabling Protection mode in HA for this addon, same result.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
NickM-27commented, Sep 22, 2022

My understanding is that the hwaccel was for the transcoding of mjpeg to h264. Is this not correct?

That is incorrect. Hwaccel is using the GPU to accelerate decoding the stream into individual frames as they are used for frigate motion and object detection (among other things).

Also read Blake’s reply above:

Mjpeg streams need special parameters. Search the docs. Also, hwaccel args will not work with mjpeg feeds.

0reactions
jshep321commented, Sep 22, 2022

@NickM-27 Ah thanks. My mistake.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intel® NUC Products
Intel® NUC Mini PCs, Elements and Laptops · Intel® NUC for Gaming. Build your own mini gaming PC without compromising performance. · Intel...
Read more >
Intel® NUC Solutions
Intel ® NUC Mini PCs, Laptops, and Elements give you the tools for innovative designs—from business productivity to visual solutions and extreme gaming....
Read more >
intel nuc - Amazon.com
Intel 2022 NUC 12 Extreme Mini PC 16-Core i9-12900 64GB DDR4 2TB NVMe SSD NVIDIA GeForce RTX 3070Ti 8GB GDDR6X WiFi 6E RJ-45...
Read more >
Mini PCs - Simply NUC
Browse and build your own small form factor pcs, fully-customisable micro computers, compact pcs. Build your Intel NUC or Mini PCs today.
Read more >
intel nuc | Newegg.com
Intel NUC 12 Pro Mini PC for Zoom Rooms RNUC12WSHi50UD1 Intel Core i5 12th Gen 1240P (1.70GHz) 16 GB RAM 256 GB SSD...
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