neolink icon indicating copy to clipboard operation
neolink copied to clipboard

Endless "buffer full"

Open f-gdovin opened this issue 9 months ago • 5 comments

I tried to setup Neolink today to get more stable and clear stream in Frigate (and eventually, HA). My cameras were working in Frigate before, when using their RTSP/RTMP URLs directly, but as said, I wanted to get clearer image.

Thus, I spun up Neolink on the same machine as Frigate, on the same docker network.

However, I am seeing some endless "buffer full" on Neolink, it seems to me like some client (Frigate?) is unable to fetch the data, and thus whole Neolink stopped?

I tried VLC to see if I could see the stream from Neolink, and I cannot. It's loading and then fails, pointing me to logs for more details. I included these logs as well.

Neolink config:

bind = "0.0.0.0"

[[users]]
name = "cameraman"
pass = "NEOLINK_REDACTED_PASSWORD"

# enable MQTT
[mqtt]
broker_addr = "mosquitto"
port = 1883
credentials = ["neolink", "MQTT_REDACTED_PASSWORD"]

[[cameras]]
name = "street"
username = "admin"
password = "REDACTED"
address = "192.168.1.180:9000"
format = "H265"
discovery = "map"
push_notifications=false

[[cameras]]
name = "garden"
username = "admin"
password = "fREDACTED"
address = "192.168.1.181:9000"
format = "H265"
discovery = "map"
push_notifications=false


[[cameras]]
name = "living_room"
username = "admin"
password = "REDACTED"
address = "192.168.1.182:9000"
format = "H264"
discovery = "map"
push_notifications=false


[[cameras]]
name = "bedroom"
username = "admin"
password = "REDACTED"
address = "192.168.1.183:9000"
format = "H264"
discovery = "map"
push_notifications=false

Frigate config:

auth:
  enabled: true
  reset_admin_password: false
  failed_login_rate_limit: 1/second;5/minute;20/hour

tls:
  enabled: false

mqtt:
  host: mosquitto
  port: 1883
  user: frigate
  password: '{FRIGATE_MQTT_PASSWORD}'

go2rtc:
  streams:
    street:
      - ffmpeg:rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/street/main
    street_sub:
      - ffmpeg:rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/street/sub
    garden:
      - ffmpeg:rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/garden/main
    garden_sub:
      - ffmpeg:rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/garden/sub
    living_room:
      - ffmpeg:rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/living_room/main
    living_room_sub:
      - ffmpeg:rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/living_room/sub
    bedroom:
      - ffmpeg:rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/bedroom/main
    bedroom_sub:
      - ffmpeg:rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/bedroom/sub

ffmpeg:
  hwaccel_args: preset-intel-qsv-h264

# irrelevant stuff ommitted

cameras:
  street:
    ffmpeg:
      inputs:
        # clear (HQ) stream
        - path: rtsp://127.0.0.1:8554/street
          input_args: preset-rtsp-restream
          hwaccel_args:
            - preset-intel-qsv-h265
          roles:
            - record

        # fluent (LQ) stream
        - path: rtsp://127.0.0.1:8554/street_sub
          input_args: preset-rtsp-restream
          roles:
            - audio
            - detect
  garden:
    ffmpeg:
      inputs:
        # clear (HQ) stream
        - path: rtsp://127.0.0.1:8554/garden
          input_args: preset-rtsp-restream
          hwaccel_args:
            - preset-intel-qsv-h265
          roles:
            - record

        # fluent (LQ) stream
        - path: rtsp://127.0.0.1:8554/garden_sub
          input_args: preset-rtsp-restream
          roles:
            - audio
            - detect
  living_room:
    ffmpeg:
      inputs:
        # clear (HQ) stream
        - path: rtsp://127.0.0.1:8554/living_room
          input_args: preset-rtsp-restream
          roles:
            - record

        # fluent (LQ) stream
        - path: rtsp://127.0.0.1:8554/living_room_sub
          input_args: preset-rtsp-restream
          roles:
            - audio
            - detect
  bedroom:
    ffmpeg:
      inputs:
        # clear (HQ) stream
        - path: rtsp://127.0.0.1:8554/bedroom
          input_args: preset-rtsp-restream
          roles:
            - record

        # fluent (LQ) stream
        - path: rtsp://127.0.0.1:8554/bedroom_sub
          input_args: preset-rtsp-restream
          roles:
            - audio
            - detect

Neolink logs:

Running: /bin/sh -c /usr/local/bin/neolink "${NEO_LINK_MODE}" --config /etc/neolink.toml
[2025-02-21T09:07:05Z INFO  neolink] Neolink 6e05e7844b5b50f89787d30bffcbbd3471bfcfde release
[2025-02-21T09:07:05Z INFO  neolink::rtsp] Starting RTSP Server at 0.0.0.0:8554
[2025-02-21T09:07:05Z INFO  neolink::rtsp] living_room: Rtsp Starting
[2025-02-21T09:07:05Z INFO  neolink::rtsp] garden: Rtsp Starting
[2025-02-21T09:07:05Z INFO  neolink::rtsp] bedroom: Rtsp Starting
[2025-02-21T09:07:05Z INFO  neolink::rtsp] street: Rtsp Starting
[2025-02-21T09:07:05Z WARN  neolink::rtsp] Without a server certificate, usernames and passwords will be exchanged in plaintext!
[2025-02-21T09:07:05Z INFO  neolink::utils] street: Connecting to camera at Address: 192.168.1.180:9000
[2025-02-21T09:07:05Z INFO  neolink::utils] garden: Connecting to camera at Address: 192.168.1.181:9000
[2025-02-21T09:07:05Z INFO  neolink::utils] living_room: Connecting to camera at Address: 192.168.1.182:9000
[2025-02-21T09:07:05Z INFO  neolink::utils] bedroom: Connecting to camera at Address: 192.168.1.183:9000
[2025-02-21T09:07:05Z INFO  neolink_core::bc_protocol] garden: Trying TCP discovery
[2025-02-21T09:07:05Z INFO  neolink_core::bc_protocol] bedroom: Trying TCP discovery
[2025-02-21T09:07:05Z INFO  neolink_core::bc_protocol] street: Trying TCP discovery
[2025-02-21T09:07:05Z INFO  neolink_core::bc_protocol] living_room: Trying TCP discovery
[2025-02-21T09:07:05Z INFO  neolink_core::bc_protocol] garden: TCP Discovery success at 192.168.1.181:9000
[2025-02-21T09:07:05Z INFO  neolink::utils] garden: Logging in
[2025-02-21T09:07:05Z INFO  neolink_core::bc_protocol] street: TCP Discovery success at 192.168.1.180:9000
[2025-02-21T09:07:05Z INFO  neolink::utils] street: Logging in
[2025-02-21T09:07:05Z INFO  neolink_core::bc_protocol] living_room: TCP Discovery success at 192.168.1.182:9000
[2025-02-21T09:07:05Z INFO  neolink::utils] living_room: Logging in
[2025-02-21T09:07:05Z INFO  neolink_core::bc_protocol] bedroom: TCP Discovery success at 192.168.1.183:9000
[2025-02-21T09:07:05Z INFO  neolink::utils] bedroom: Logging in
[2025-02-21T09:07:05Z INFO  neolink::utils] garden: Connected and logged in
[2025-02-21T09:07:05Z INFO  neolink::utils] street: Connected and logged in
[2025-02-21T09:07:05Z INFO  neolink::utils] living_room: Connected and logged in
[2025-02-21T09:07:05Z INFO  neolink::utils] bedroom: Connected and logged in
[2025-02-21T09:07:07Z INFO  neolink::common::camthread] garden: Camera time is already set: 2025-02-21 10:07:11.0 -01:00:00
[2025-02-21T09:07:07Z INFO  neolink::common::camthread] street: Camera time is already set: 2025-02-21 10:07:23.0 -01:00:00
[2025-02-21T09:07:07Z INFO  neolink::common::camthread] living_room: Camera time is already set: 2025-02-21 10:07:16.0 -01:00:00
[2025-02-21T09:07:07Z INFO  neolink::common::camthread] bedroom: Camera time is already set: 2025-02-21 10:07:18.0 -01:00:00
[2025-02-21T09:07:09Z INFO  neolink::common::neocam] garden: Model Reolink Duo 2 PoE
[2025-02-21T09:07:09Z INFO  neolink::common::neocam] garden: Firmware Version v3.0.0.1889_2312234560
[2025-02-21T09:07:09Z INFO  neolink::rtsp::stream] garden: Available at /garden/main, /garden/Main, /garden/mainStream, /garden/MainStream, /garden/Mainstream, /garden/mainstream, /garden
[2025-02-21T09:07:09Z INFO  neolink::rtsp::stream] garden: Available at /garden/sub, /garden/Sub, /garden/subStream, /garden/SubStream, /garden/Substream, /garden/substream
[2025-02-21T09:07:09Z INFO  neolink::common::neocam] street: Model Reolink Duo 2 PoE
[2025-02-21T09:07:09Z INFO  neolink::common::neocam] street: Firmware Version v3.0.0.1889_2312234560
[2025-02-21T09:07:09Z INFO  neolink::rtsp::stream] street: Available at /street/main, /street/Main, /street/mainStream, /street/MainStream, /street/Mainstream, /street/mainstream, /street
[2025-02-21T09:07:09Z INFO  neolink::rtsp::stream] street: Available at /street/sub, /street/Sub, /street/subStream, /street/SubStream, /street/Substream, /street/substream
[2025-02-21T09:07:09Z INFO  neolink::rtsp::stream] bedroom: Available at /bedroom/main, /bedroom/Main, /bedroom/mainStream, /bedroom/MainStream, /bedroom/Mainstream, /bedroom/mainstream, /bedroom
[2025-02-21T09:07:09Z INFO  neolink::rtsp::stream] bedroom: Available at /bedroom/sub, /bedroom/Sub, /bedroom/subStream, /bedroom/SubStream, /bedroom/Substream, /bedroom/substream
[2025-02-21T09:07:09Z INFO  neolink::common::neocam] living_room: Model E1 Zoom
[2025-02-21T09:07:09Z INFO  neolink::common::neocam] living_room: Firmware Version v3.1.0.3382_2404178024
[2025-02-21T09:07:09Z INFO  neolink::rtsp::stream] living_room: Available at /living_room/main, /living_room/Main, /living_room/mainStream, /living_room/MainStream, /living_room/Mainstream, /living_room/mainstream, /living_room
[2025-02-21T09:07:09Z INFO  neolink::rtsp::stream] living_room: Available at /living_room/sub, /living_room/Sub, /living_room/subStream, /living_room/SubStream, /living_room/Substream, /living_room/substream
[2025-02-21T09:07:09Z INFO  neolink::common::neocam] bedroom: Model E1 Zoom
[2025-02-21T09:07:09Z INFO  neolink::common::neocam] bedroom: Firmware Version v3.1.0.3382_2404178024
[2025-02-21T09:07:11Z INFO  neolink::rtsp::factory] Buffer full on vidsrc pausing stream until client consumes frames
[2025-02-21T09:07:11Z INFO  neolink::rtsp::factory] Buffer full on audsrc pausing stream until client consumes frames
[2025-02-21T09:07:11Z INFO  neolink::rtsp::factory] Buffer full on vidsrc pausing stream until client consumes frames

// this goes on and on and on, millions of lines

[2025-02-21T09:01:37Z INFO  neolink::rtsp::factory] Buffer full on audsrc pausing stream until client consumes frames
[2025-02-21T09:01:37Z INFO  neolink::rtsp::factory] Buffer full on vidsrc pausing stream until client consumes frames
[2025-02-21T09:01:37Z INFO  neolink::rtsp::factory] Buffer full on vidsrc pausing stream until client consumes frames
[2025-02-21T09:01:37Z INFO  neolink::rtsp::factory] Buffer full on vidsrc pausing stream until client consumes frames
[2025-02-21T09:01:37Z INFO  neolink::rtsp::factory] Buffer full on audsrc pausing stream until client consumes frames

Frigate logs:

2025-02-21 10:13:56.849495544  [2025-02-21 10:13:56] watchdog.living_room           ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2025-02-21 10:13:56.849504909  [2025-02-21 10:13:56] ffmpeg.living_room.detect      ERROR   : libva info: VA-API version 1.22.0
2025-02-21 10:13:56.849543398  [2025-02-21 10:13:56] ffmpeg.living_room.detect      ERROR   : libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
2025-02-21 10:13:56.849604731  [2025-02-21 10:13:56] ffmpeg.living_room.detect      ERROR   : libva info: Found init function __vaDriverInit_1_22
2025-02-21 10:13:56.849622631  [2025-02-21 10:13:56] ffmpeg.living_room.detect      ERROR   : libva info: va_openDriver() returns 0
2025-02-21 10:13:56.849662144  [2025-02-21 10:13:56] ffmpeg.living_room.detect      ERROR   : [in#0 @ 0x5a0a0e4dd5c0] Error opening input: Invalid data found when processing input
2025-02-21 10:13:56.849699484  [2025-02-21 10:13:56] ffmpeg.living_room.detect      ERROR   : Error opening input file rtsp://127.0.0.1:8554/living_room_sub.
2025-02-21 10:13:56.849742985  [2025-02-21 10:13:56] ffmpeg.living_room.detect      ERROR   : Error opening input files: Invalid data found when processing input
2025-02-21 10:13:56.864546415  [2025-02-21 10:13:56] ffmpeg.living_room.record      ERROR   : [in#0 @ 0x56e1931eccc0] Error opening input: Invalid data found when processing input
2025-02-21 10:13:56.869770034  [2025-02-21 10:13:56] ffmpeg.living_room.record      ERROR   : Error opening input file rtsp://127.0.0.1:8554/living_room.
2025-02-21 10:13:56.869816044  [2025-02-21 10:13:56] ffmpeg.living_room.record      ERROR   : Error opening input files: Invalid data found when processing input
2025-02-21 10:13:56.869851131  [2025-02-21 10:13:56] watchdog.living_room           INFO    : Terminating the existing ffmpeg process...
2025-02-21 10:13:56.869885714  [2025-02-21 10:13:56] watchdog.living_room           INFO    : Waiting for ffmpeg to exit gracefully...
2025-02-21 10:13:56.879901156  [2025-02-21 10:13:56] watchdog.bedroom               ERROR   : Ffmpeg process crashed unexpectedly for bedroom.
// same for other cameras

Frigate go2rtc logs:

2025-02-21 10:14:52.274828876  10:14:52.274 WRN [rtsp] error="streams: exec: [in#0 @ 0x5a9f04c80d00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/street/sub.\nError opening input files: Invalid data found when processing input\n" stream=street_sub
2025-02-21 10:14:52.304278003  10:14:52.304 WRN [rtsp] error="streams: exec: [in#0 @ 0x6374bb113d00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/garden/sub.\nError opening input files: Invalid data found when processing input\n" stream=garden_sub
2025-02-21 10:14:52.325312682  10:14:52.325 WRN [rtsp] error="streams: exec: [in#0 @ 0x5842a5e4ad00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/living_room/sub.\nError opening input files: Invalid data found when processing input\n" stream=living_room_sub
2025-02-21 10:14:52.355414293  10:14:52.355 WRN [rtsp] error="streams: exec: [in#0 @ 0x5c797ca8ed00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/bedroom/sub.\nError opening input files: Invalid data found when processing input\n" stream=bedroom_sub
2025-02-21 10:14:57.669078730  10:14:57.669 WRN [rtsp] error="streams: exec: [in#0 @ 0x6438503d6d00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/street/sub.\nError opening input files: Invalid data found when processing input\n" stream=street_sub
2025-02-21 10:14:57.681264010  10:14:57.681 WRN [rtsp] error="streams: exec: [in#0 @ 0x5c9f3fdd4d00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/garden/sub.\nError opening input files: Invalid data found when processing input\n" stream=garden_sub
2025-02-21 10:14:57.687155762  10:14:57.687 WRN [rtsp] error="streams: exec: [in#0 @ 0x6447c17f2d00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/living_room/sub.\nError opening input files: Invalid data found when processing input\n" stream=living_room_sub
2025-02-21 10:14:57.696364208  10:14:57.696 WRN [rtsp] error="streams: exec: [in#0 @ 0x59c53731ed00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/bedroom/sub.\nError opening input files: Invalid data found when processing input\n" stream=bedroom_sub
2025-02-21 10:15:02.100128648  10:15:02.100 WRN [rtsp] error="streams: exec: [in#0 @ 0x5b7875e8bd00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/street/main.\nError opening input files: Invalid data found when processing input\n" stream=street
2025-02-21 10:15:02.130295327  10:15:02.130 WRN [rtsp] error="streams: exec: [in#0 @ 0x62e624b49d00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/garden/main.\nError opening input files: Invalid data found when processing input\n" stream=garden
2025-02-21 10:15:02.157639772  10:15:02.157 WRN [rtsp] error="streams: exec: [in#0 @ 0x55f31227ad00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/living_room/main.\nError opening input files: Invalid data found when processing input\n" stream=living_room
2025-02-21 10:15:02.190960021  10:15:02.190 WRN [rtsp] error="streams: exec: [in#0 @ 0x59ed3af83d00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/bedroom/main.\nError opening input files: Invalid data found when processing input\n" stream=bedroom
2025-02-21 10:15:02.780529243  10:15:02.780 WRN [rtsp] error="streams: exec: [in#0 @ 0x5a0629ef1d00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/street/sub.\nError opening input files: Invalid data found when processing input\n" stream=street_sub
2025-02-21 10:15:02.793102947  10:15:02.793 WRN [rtsp] error="streams: exec: [in#0 @ 0x61d2a2496d00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/garden/sub.\nError opening input files: Invalid data found when processing input\n" stream=garden_sub
2025-02-21 10:15:02.798457173  10:15:02.798 WRN [rtsp] error="streams: exec: [in#0 @ 0x610f3a02fd00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/living_room/sub.\nError opening input files: Invalid data found when processing input\n" stream=living_room_sub
2025-02-21 10:15:02.808497366  10:15:02.808 WRN [rtsp] error="streams: exec: [in#0 @ 0x6278e14fad00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://cameraman:NEOLINK_REDACTED_PASSWORD@neolink:8554/bedroom/sub.\nError opening input files: Invalid data found when processing input\n" stream=bedroom_sub

VLC stream URL: rtsp://cameraman:[email protected]:8554/street/sub

VLC logs:

main debug: using interface module "qt"
main: playlist is empty
main debug: nothing to play
main debug: processing request item: rtsp://192.168.1.63:8554/street/sub, node: Playlist, skip: 0
main debug: rebuilding array of current - root Playlist
main debug: rebuild done - 1 items, index 0
main debug: starting playback of new item
main debug: resyncing on rtsp://192.168.1.63:8554/street/sub
main debug: rtsp://192.168.1.63:8554/street/sub is at 0
main debug: creating new input thread
main debug: Creating an input for 'rtsp://192.168.1.63:8554/street/sub'
main debug: requesting art for new input thread
main debug: using timeshift granularity of 50 MiB
main debug: using timeshift path: C:\Users\Filip\AppData\Local\Temp
main debug: `rtsp://cameraman:[email protected]:8554/street/sub' gives access `rtsp' demux `any' path `cameraman:[email protected]:8554/street/sub'
main debug: creating demux: access='rtsp' demux='any' location='cameraman:[email protected]:8554/street/sub' file='\\cameraman:[email protected]:8554\street\sub'
main debug: looking for access_demux module matching "rtsp": 15 candidates
live555 debug: version 2016.11.28
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\Filip\AppData\Roaming\vlc\lua\meta\fetcher
main warning: Password in a URI is DEPRECATED
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module 

// end of logs

Versions NVR software: Frigate docker:latest Neolink software: docker:latest Reolink camera model and firmware: "street" and "garden" are Duo 2 PoE (FW v3.0.0.1889_2312234560) "living_room" and "bedroom" are E1 Zoom (FW v3.1.0.3382_2404178024)

f-gdovin avatar Feb 21 '25 09:02 f-gdovin

Hi @f-gdovin , did you find any solution to this issue ? I am having the exact same problem.

abuttez avatar Mar 15 '25 14:03 abuttez

same here. config works in a local Ubuntu vm but not using the docker image.

privatecoder avatar Mar 25 '25 10:03 privatecoder

Managed to fix by rolling back to v0.6.2

abuttez avatar Mar 25 '25 18:03 abuttez

I can confirm this too.. I was using the latest release but I wanted to see if a newer build would be more stable on my new lumus - so I did a git build and yes - same error.

Kelerion-UK avatar Mar 29 '25 12:03 Kelerion-UK

Thanks y'all....was going insane tryna to understand what i did wrong. rolling back to v0.6.2 did that trick for me. Running docker image...here's tag link if anyone looking for it. docker pull quantumentangledandy/neolink:v0.6.2

sammykumar avatar Apr 19 '25 21:04 sammykumar