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

Connection issue rtsp.go: read tcp ... i/o timeout #1064

Open
mrmiles156 opened this issue Apr 27, 2024 · 5 comments
Open

Connection issue rtsp.go: read tcp ... i/o timeout #1064

mrmiles156 opened this issue Apr 27, 2024 · 5 comments
Labels
question Further information is requested

Comments

@mrmiles156
Copy link

mrmiles156 commented Apr 27, 2024

I hope someone can help me, I have Frigate installed in a docker container and I can see all my camera's in the Frigate Webui and home assistant. but I can't connect to the rtsp feed that go2rtc via VLC (Your input can't be opened) VLC is unable to open the VLC is unable to open the MRL 'rtsp://192.168.16.203:8554/front_drive

My Frigate config lookes like this

go2rtc:
  streams:
    Front_Drive: # <- for RTSP streams
      - rtsp://192.168.15.11:554/stream0
     # - "ffmpeg:Front_Drive#video=h264"
    Front_Drive_Sub:
      - rtsp://192.168.15.11:554/stream1
     # - "ffmpeg:Front_Drive_Sub#video=h264"

  Front_Drive:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/Front_Drive
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/Front_Drive_Sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:    
      width: 1280
      height: 720
      fps: 5
    objects:
      track:
        - person
        - car
      filters:  
        person:
          threshold: 0.7
    snapshots:
      required_zones:
        - Front_Drive_Driveway
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 5 
    record:
      enabled: true
      retain:
        days: 5
      events:
        required_zones:
          - Front_Drive_Driveway
        pre_capture: 5
        post_capture: 5
        retain:
          default: 5

with the the Frigate Webui under Logs > Go2rtc i get the following error

2024-04-27 08:40:06.337838321  [INFO] Preparing new go2rtc config...
2024-04-27 08:40:06.740485290  [INFO] Starting go2rtc...
2024-04-27 08:40:06.861664709  08:40:06.861 INF go2rtc version 1.8.4 linux/amd64
2024-04-27 08:40:06.862180571  08:40:06.862 INF [api] listen addr=:1984
2024-04-27 08:40:06.862384338  08:40:06.862 INF [rtsp] listen addr=:8554
2024-04-27 08:40:06.862637174  08:40:06.862 INF [webrtc] listen addr=:8555
2024-04-27 08:40:16.333096539  [INFO] Starting go2rtc healthcheck service...
2024-04-27 08:57:37.959295803  08:57:37.959 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:225 > error="read tcp 192.168.208.2:8554->192.168.208.1:41188: i/o timeout"

192.168.208.0 seems to be the docker bridge network. I can see .1 being the the gateway

Where am I going wrong?

@AlexxIT AlexxIT added the question Further information is requested label Apr 27, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Apr 27, 2024

You have very complex network setup. It's only up to you to find the problem.
192.168.16.203 - address of your server from your PC
192.168.208.2 - address of your server (according to go2rtc)
192.168.208.1 - address of your PC (according to go2rtc)

"i/o timeout" - can only mean one thing - timeout for reading or writing to the network

@mrmiles156
Copy link
Author

mrmiles156 commented Apr 27, 2024

How should I have this setup?, as I think i used the default

version: "3.9"
services:
  frigate:
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "512mb" # update for your cameras based on calculation above
    devices:
      - /dev/bus/usb:/dev/bus/usb  # Passes the USB Coral, needs to be modified for other versions
      - /dev/apex_0:/dev/apex_0    # Passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
      - /dev/video11:/dev/video11  # For Raspberry Pi 4B
      - /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro"
      - /volume3/docker/frigate/config:/config
      - /volume2/Backup/frigate:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "8001:5000"
      - "8554:8554" # RTSP feeds
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
    environment:
      FRIGATE_RTSP_PASSWORD:

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 27, 2024

I don't know. Personally, I don't give myself any problems with different home subnets. Even VPN access to the home network falls into the same subnet.

@mrmiles156
Copy link
Author

OK, so you are suggesting that this Go2rtc rtsp url is not to access rstp url on the camera?
rtsp://127.0.0.1:8554/Front_Drive

rtsp://192.168.15.11:554/stream0

or my rtsp://192.168.16.203:8554/front_drive is the wrong url?

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 27, 2024

It's just connection issue. The problem is in your home network setup

@AlexxIT AlexxIT changed the title WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:225 > error="read using Frigate in a docker container Connection issue rtsp.go: read tcp ... i/o timeout Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants