Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Debug Options? #2

Open
kashalls opened this issue Oct 20, 2024 · 6 comments
Open

Possible Debug Options? #2

kashalls opened this issue Oct 20, 2024 · 6 comments

Comments

@kashalls
Copy link

Is there any debug options possible? I was trying to get a rtsp stream from go2rtc to convert a h264 stream from a USB Camera to RTSP and using this to wrap it for UniFi Protect. Protect see's the camera, but it is hard stuck on the snapshot image. Shows as H264 stream, not sure what to go from here.

9yCQMgU
image

@kashalls
Copy link
Author

config.yaml

onvif:
  - mac: d8:3a:dd:15:83:a9
    ports:
      server: 8081                                # The port for the server to run on
      rtsp: 8554                                  # The port for the stream passthrough, leave this at 8554
    name: MyRTSPStream                            # A user define name
    uuid: 1714a629-ebe6-4bb8-a430-c18ffd8fa5f6    # A randomly chosen UUID (see below)
    highQuality:
      rtsp: /usb2?mp4                           # The RTSP Path
      width: 1280                                 # The Video Width
      height: 720                                # The Video Height
      framerate: 10                               # The Video Framerate/FPS
      bitrate: 1024                               # The Video Bitrate in kb/s
      quality: 4                                  # Quality, leave this as 4 for the high quality stream.
    lowQuality:
      rtsp: /usb2?mp4                           # The RTSP Path
      width: 1280                                 # The Video Width
      height: 720                                # The Video Height
      framerate: 10                               # The Video Framerate/FPS
      bitrate: 1024                               # The Video Bitrate in kb/s
      quality: 1                                  # Quality, leave this as 1 for the low quality stream.
    target:
      hostname: 127.0.0.1                      # The Hostname of the RTSP stream
      ports:
        rtsp: 5546                                 # The Port of the RTSP stream

go2rtc.yaml

streams:
  usb2: ffmpeg:device?video=/dev/video0&video_size=1280x720#video=h264#hardware
rtsp:
  listen: ":5546"

@daniela-hase
Copy link
Owner

That little window that pops up in Unifi Protect when you click on the preview image of a Camera for some reason always only shows the Snapshots.

Try looking at your Camera in the Dashboard or actual Playback view - does it show your stream correctly there? :)

@kashalls
Copy link
Author

Try looking at your Camera in the Dashboard or actual Playback view - does it show your stream correctly there? :)

Tried that already. Go2rtc has a counter for open streams, it is always 0

@kashalls
Copy link
Author

Is it possible to add some debug logging that can be enabled with a --debug flag or environment variable? Some options would be nice to see if UniFi is actually reaching the tcp proxy or if the proxy actually is able to forward to the rtsp source.

@p10tyr
Copy link
Contributor

p10tyr commented Nov 2, 2024

Was just looking around the code and there is a -d flag you can use. That currenly oly shows if something is requesting access to the camera streams.. quite basic.

I struggled with somebody else too around the networking side of things so will try and make a PR with a bit more debugging stuff to help others.

@p10tyr
Copy link
Contributor

p10tyr commented Nov 4, 2024

I have changed and added a lot of features in my fork repo

https://github.com/p10tyr/rtsp-to-onvif

dciancu pushed a commit to dciancu/onvif-server that referenced this issue Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants