Giter Site home page Giter Site logo

Comments (12)

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024 1

Just thought I'd share the test docker and frigate setup I use

docker-compose.yml

version: "3.9"
services:
  frigate:
    image: ghcr.io/blakeblackshear/frigate:stable
    links:
      - neolink
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./frigate.yml:/config/config.yml
      - ./storage:/media/frigate
      - ./db:/db
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000"
      - "8554:8554" # RTSP feeds
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
  neolink:
    image: quantumentangledandy/neolink:latest
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./neolink.toml:/etc/neolink.toml
    environment:
      RUST_LOG: "neolink=debug"

neolink.toml

bind = "0.0.0.0"

[[cameras]]
name = "ANAME"
username = "MYUSER"
password = "MYPASS"
address = "MYIP:9000"
uid = "MYUID"
stream = "subStream"

frigate.yml

database:
    path: /db/frigate.db

mqtt:
    enabled: false

cameras:
    ANAME:
      ffmpeg:
        inputs:
          - path: rtsp://neolink:8554/ANAME/subStream
      detect:
        enabled: False
        width: 1280 # <---- update for your camera's resolution
        height: 720

from neolink.

mattlcbesc avatar mattlcbesc commented on August 16, 2024
    - path: rtsp://192.168.27.114:8554/homesite # <----- The stream you want to use for detection

^^ Path used in Frigate for rtsp stream

Add'l logs from neolink:
[2023-05-03T16:20:03Z DEBUG neolink::rtsp::gst::sender] Video format set to: H264 from Unknown
[2023-05-03T16:20:04Z DEBUG neolink::rtsp::gst::sender] Audio format set to: Aac from Unknown
[2023-05-03T16:20:12Z DEBUG neolink::rtsp::gst::sender] Video format set to: H264 from Unknown
[2023-05-03T16:20:13Z DEBUG neolink::rtsp::gst::sender] Audio format set to: Aac from Unknown
[2023-05-03T16:20:31Z DEBUG neolink::rtsp::gst::factory] Building H264 Pipeline
[2023-05-03T16:20:31Z DEBUG neolink::rtsp::gst::factory] Building Aac pipeline
[2023-05-03T16:20:31Z DEBUG neolink::rtsp::gst::factory] Linking encoder to decoder: Some(Caps(audio/x-raw(memory:SystemMemory) { format: (gchararray) "S16LE", layout: (gchararray) "interleaved", rate: (gint) 16000, channels: (gint) 2, channel-mask: (GstBitmask) 0x0000000000000003 }))
[2023-05-03T16:20:31Z DEBUG neolink::rtsp::gst::sender] Pushed Video Buffer: ms: 2987451152, st: 2984851152, delta: 2600000
[2023-05-03T16:20:31Z DEBUG neolink::rtsp::gst::sender] Failed to send buffer: Could not push buffer to appsrc
[2023-05-03T16:20:41Z DEBUG neolink::rtsp::gst::factory] Building H264 Pipeline
[2023-05-03T16:20:41Z DEBUG neolink::rtsp::gst::factory] Building Aac pipeline
[2023-05-03T16:20:41Z DEBUG neolink::rtsp::gst::factory] Linking encoder to decoder: Some(Caps(audio/x-raw(memory:SystemMemory) { format: (gchararray) "S16LE", layout: (gchararray) "interleaved", rate: (gint) 16000, channels: (gint) 2, channel-mask: (GstBitmask) 0x0000000000000003 }))
[2023-05-03T16:20:41Z DEBUG neolink::rtsp::gst::sender] Pushed Audio Buffer
[2023-05-03T16:20:41Z DEBUG neolink::rtsp::gst::sender] Failed to send buffer: Could not push buffer to appsrc
[2023-05-03T16:20:51Z DEBUG neolink::rtsp::gst::factory] Building H264 Pipeline
[2023-05-03T16:20:51Z DEBUG neolink::rtsp::gst::factory] Building Aac pipeline
[2023-05-03T16:20:51Z DEBUG neolink::rtsp::gst::factory] Linking encoder to decoder: Some(Caps(audio/x-raw(memory:SystemMemory) { format: (gchararray) "S16LE", layout: (gchararray) "interleaved", rate: (gint) 16000, channels: (gint) 2, channel-mask: (GstBitmask) 0x0000000000000003 }))
[2023-05-03T16:20:51Z DEBUG neolink::rtsp::gst::sender] Pushed Audio Buffer
[2023-05-03T16:20:51Z DEBUG neolink::rtsp::gst::sender] Failed to send buffer: Could not push buffer to appsrc
[2023-05-03T16:21:01Z DEBUG neolink::rtsp::gst::factory] Building H264 Pipeline
[2023-05-03T16:21:01Z DEBUG neolink::rtsp::gst::factory] Building Aac pipeline
[2023-05-03T16:21:01Z DEBUG neolink::rtsp::gst::factory] Linking encoder to decoder: Some(Caps(audio/x-raw(memory:SystemMemory) { format: (gchararray) "S16LE", layout: (gchararray) "interleaved", rate: (gint) 16000, channels: (gint) 2, channel-mask: (GstBitmask) 0x0000000000000003 }))
[2023-05-03T16:21:01Z DEBUG neolink::rtsp::gst::sender] Pushed Video Buffer: ms: 3016452152, st: 3016252152, delta: 200000
[2023-05-03T16:21:01Z DEBUG neolink::rtsp::gst::sender] Pushed Audio Buffer
[2023-05-03T16:21:01Z DEBUG neolink::rtsp::gst::sender] Pushed Audio Buffer
[2023-05-03T16:21:01Z DEBUG neolink::rtsp::gst::sender] Pushed Audio Buffer
[2023-05-03T16:21:01Z DEBUG neolink::rtsp::gst::sender] Pushed Video Buffer: ms: 3016652152, st: 3016252152, delta: 400000
[2023-05-03T16:21:02Z DEBUG neolink::rtsp::gst::sender] Pushed Audio Buffer
[2023-05-03T16:21:02Z DEBUG neolink::rtsp::gst::sender] Failed to send buffer: Could not push buffer to appsrc
[2023-05-03T16:21:06Z INFO neolink::rtsp] Pause buffer prepared
[2023-05-03T16:21:06Z INFO neolink::rtsp] Await Client Pause
[2023-05-03T16:21:06Z INFO neolink::rtsp] Client Pause
[2023-05-03T16:21:06Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:06Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:06Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 4)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 4)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 4)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 4)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 4)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 4)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 4)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 4)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 3 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 4 (number: 5)
[2023-05-03T16:21:07Z DEBUG neolink_core::bc_protocol::connection::bcconn] Ignoring uninteresting message id 4 (number: 4)

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

Might be best to test without pause on so we can eliminate the issue as comming from the start up time.

We are currently testing a rework of the stream data in #68 that might help with frigate. But the testers there are getting issue I can't replicate. Perhaps you can give it a try especially if your on another os

from neolink.

mattlcbesc avatar mattlcbesc commented on August 16, 2024

No change in what I'm seeing from Frigate. Here's an updated log from neolink: https://pastebin.com/KcjpWqhQ

ffprobe from the frigate system acts like it's not receiving any data now.

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

From what I can see with that. It's just that the rtsp stream in frigate is trying to run faster than the stream is pulling data. I'll see if I can smooth this out when I get a moment to work on the code

How are you viewing the stream in frigate? I've just gotten a setup for testing purposes but Ive never used it before. Are your looking at it from the webui or do I need to test the view on it's own rtsp feed?

from neolink.

mattlcbesc avatar mattlcbesc commented on August 16, 2024

I normally view from the standard webui. I did comment out the pause lines as well. Below is my config for the rtsp feed from neolink in frigate.

  homesite: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://192.168.27.114:8554/homesite/subStream # <----- The stream you want to use for detection
          input_args: 
            - preset-rtsp-restream
          roles:
            - detect
            - record

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

Can you check again with the latest build? I've added some code to buffer and apply time stamps better for VLC and frigate that seems to be working for me

from neolink.

mattlcbesc avatar mattlcbesc commented on August 16, 2024

Video stream is working in Frigate. My log is getting spammed with this from gstreamer: buffer exhausted. Not enough data from Camera. Not sure if there's a setting camera side to set that. And by spammed, i mean about 20/second lol. Thanks for getting it this far. I'm happy to have a working video stream.

from neolink.

mattlcbesc avatar mattlcbesc commented on August 16, 2024

Also, i had to use go2rtc in Frigate to get the video feed working. Were you able to ingest the feed in Frigate directly from Neolink? Or did you have to go through go2rtc? Mind sharing your frigate camera settings if you didnt use go2rtc? Thanks

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

Buffer exhausted seems to happen when the video is too large to be handled quickly enough to be live. Try reducing the bit rate etc using the official app first.

I just used the default config in frigate. No options other than the address really.

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

Do you think this can be closed? I'm hoping that latests fixes this as I've had a lot of work go into optimising the UDP streams

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

Closing because I think this is addressed in latest, but if not please re-open

from neolink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.