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]: ERROR: FFMPEG sent broken frame. memoryview assignment: lvalue and rvalue have different structures

See original GitHub issue

Describe the problem you are having

I have been at it for weeks trying to get the dreaded green screen to disappear. I have a Reolink E1 Pro and an Amcrest AD410 doorbell. Only the doorbell is in my configuration because I saw Reolink has some other additional arguments needed, so I wanted to just get this one going first.

I have searched all the different issues that are even remotely close to the issue I’m having. I have tried a lot of suggestions i.e. input args, hardware accelerators, tried different sub-streams and resolutions. I’ve used VLC to get the correct codec info for my two cameras. The RTSP’s work in VLC but from reading, I understand VLC does not use FFMPEG. I am running Frigate-Nvidia on Docker through Unraid. My current config is the closest I can get without receiving other errors for invalid args. I’m hoping that I can get this resolved through here like so many others have.

Version

Screenshot 2022-02-10 092646

Frigate (0.9.4-26ae608)

Frigate config file

mqtt:
![Screenshot 2022-02-10 092747](https://user-images.githubusercontent.com/60854631/153451740-0386b431-19ec-4f05-967e-0863bdde00e2.png)

  host: 192.168.1.182
  port: 1883
  user: mqttuser
  password: [password_here]

cameras:
  doorbell:
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - vaapi
        - -hwaccel_device
        - /dev/dri/renderD128
        - -hwaccel_output_format
        - yuv420p
        - -c:v
        - h264_cuvid
#      input_args:
#       - -c:v
#       - h264_cuvid
      inputs:
        - path: rtsp://viewer:[FRIGATE_PASSWORD_IN_REAL_CONFIG]@192.168.1.54:554/cam/realmonitor?channel=1&subtype=1&authbasic=64
          roles:
            - detect
    detect:
      width: 720
      height: 576
      fps: 5
    rtmp:
      enabled: false

detectors:
  cpu1:
    type: cpu
  cpu2:
    type: cpu
  cpu3:
    type: cpu

Relevant log output

[2022-02-10 08:01:26] frigate.app INFO : Starting Frigate (0.9.4-26ae608)
Starting migrations
[2022-02-10 08:01:26] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-02-10 08:01:26] peewee_migrate INFO : There is nothing to migrate
[2022-02-10 08:01:26] frigate.mqtt INFO : MQTT connected
[2022-02-10 08:01:26] detector.cpu1 INFO : Starting detection process: 233
[2022-02-10 08:01:26] detector.cpu2 INFO : Starting detection process: 234
[2022-02-10 08:01:26] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-02-10 08:01:26] detector.cpu3 INFO : Starting detection process: 236
[2022-02-10 08:01:26] frigate.app INFO : Output process started: 238
[2022-02-10 08:01:26] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-02-10 08:01:26] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-02-10 08:01:26] ws4py INFO : Using epoll
[2022-02-10 08:01:26] frigate.app INFO : Camera processor started for doorbell: 241
[2022-02-10 08:01:26] frigate.app INFO : Capture process started for doorbell: 245
[2022-02-10 08:01:26] frigate.video INFO : doorbell: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2022-02-10 08:01:26] frigate.video INFO : doorbell: ffmpeg process is not running. exiting capture thread...
[2022-02-10 08:01:26] ws4py INFO : Using epoll
[2022-02-10 08:01:29] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56446]
[2022-02-10 08:01:46] watchdog.doorbell ERROR : FFMPEG process crashed unexpectedly for doorbell.
[2022-02-10 08:01:46] watchdog.doorbell ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-02-10 08:01:46] watchdog.doorbell ERROR : You may have invalid args defined for this camera.
[2022-02-10 08:01:46] ffmpeg.doorbell.detect ERROR : [tcp @ 0x564037ba82c0] Port missing in uri
[2022-02-10 08:01:46] ffmpeg.doorbell.detect ERROR : rtsp://viewer:MoTOR0lA#23336@192.168.1.54:554/cam/realmonitor?channel=1&subtype=1&authbasic=64: Invalid argument
[2022-02-10 08:01:46] frigate.video INFO : doorbell: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2022-02-10 08:01:46] frigate.video INFO : doorbell: ffmpeg process is not running. exiting capture thread...
[2022-02-10 08:01:46] watchdog.doorbell ERROR : FFMPEG process crashed unexpectedly for doorbell.
[2022-02-10 08:01:46] watchdog.doorbell ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-02-10 08:01:46] watchdog.doorbell ERROR : You may have invalid args defined for this camera.
[2022-02-10 08:01:46] ffmpeg.doorbell.detect ERROR : [tcp @ 0x564037ba82c0] Port missing in uri
[2022-02-10 08:01:46] ffmpeg.doorbell.detect ERROR : rtsp://viewer:MoTOR0lA#23336@192.168.1.54:554/cam/realmonitor?channel=1&subtype=1&authbasic=64: Invalid argument
[2022-02-10 08:01:46] frigate.video INFO : doorbell: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
[2022-02-10 08:01:46] frigate.video INFO : doorbell: ffmpeg process is not running. exiting capture thread...
[2022-02-10 08:01:54] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56446]
[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.
[s6-finish] sending all processes the KILL signal and exiting.

FFprobe output from your camera

Can't seem to get this working through the terminal.

Frigate stats

No response

Operating system

UNRAID

Install method

Docker Compose

Coral version

Other

Network connection

Wired

Camera make and model

AMCREST AD410

Any other information that may be helpful

Unrelated to my issue, I have passed one of my two GTX 960’s through. GPU’s are in SLI mode and were when I purchased the PC. I’m not sure if I need to passthrough both GPU’s or not.

I’m a tinkerer, not a full fledged tech guy. I have basic knowledge and have been building that over the past 2.5 years mainly through growing with Home Assistant.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17

github_iconTop GitHub Comments

1reaction
jmaack23commented, Feb 10, 2022

I got it working! I did two things to fix it…One, I went and reset my camera password to exclude any special characters and changed the url to read rtsp://admin:my new password, that fixed my unauthorized 401 error. Second, I went back to the nvidia docs and realized that I had put the h264_cuvid under hardware acc instead of input args. Once I did that, PRESTO, I finally have a working picture in the GUI and all errors are gone. Thank you @NickM-27, you righted the ship for me and got me back to basics after the troubleshooting rabbit hole I went down. It would’ve been a while before it would’ve dawned on me to try changing the password.

1reaction
jmaack23commented, Feb 10, 2022

Thanks @NickM-27 I’ll give those args a try in a bit. Along the way, I did come across the audio args, but I couldn’t seem to find them again. And yes I am using the Nvidia-frigate version from the community store. I did install the Nvidia add-on as well, which I believe installs the drivers?? And I think the only hardware accelerators I need according to the docs are -c:v and h264_cuvid. I’ll try a couple variations there

Read more comments on GitHub >

github_iconTop Results From Across the Web

ffmpeg sent a broken frame. memoryview assignment: lvalue ...
Describe the bug Unable to capture camera frames via ffmpeg on RPI 3B . ... assignment: lvalue and rvalue have different structures #941....
Read more >
Frigate FFMPEG Parameter Help : r/homeassistant - Reddit
frigate.video INFO : garden_cam: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures frigate.video ...
Read more >
Local realtime person detection for RTSP cameras
frigate.video INFO : porch_beta: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures ...
Read more >
[SUPPORT] blakeblackshear - Frigate - Page 12
video INFO : front_driveway: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures [2021-11-20 16:48:56] ...
Read more >
0.8 beta 2: ffmpeg sent a broken frame. memoryview assignment
0.8 beta 1 -> 0.8 beta 2: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures,
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