go2rtc: RTSP wrong input for chinese camera

Hi, I have 10 cameras but only one of this model (INQMEGA IL-PTZ381-2M-C: https://aliexpress.com/item/4000780447748.html), and it keeps causing go2rt to send this in the logs:

12:15:30.219 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:16:33.515 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" 

It mentions av0, but if I remove av0 from my go2rtc config and put av1 instead, it errors the same but with av1 now.

I did my best to isolate the issue. This is the minimal config and environment to reproduce it:

log:
  level: debug
  api: debug
  exec: debug
  ngrok: debug
  rtsp: debug
  streams: debug
  webrtc: debug

streams:
  rua:
    - rtsp://admin:12345@192.168.1.33:554/0/av1
    - "ffmpeg:rua#audio=aac"
  rua_hd:
    - rtsp://admin:12345@192.168.1.33:554/0/av0
    - rtsp://127.0.0.1:8554/rua?audio=aac

https://user-images.githubusercontent.com/29582865/216083346-4269f618-4556-4893-8669-636064f69f41.mp4

{
  "producers": [
    {
      "type": "RTSP source",
      "url": "rtsp://192.168.1.33:554/0/av1",
      "remote_addr": "192.168.1.33:554",
      "user_agent": "go2rtc/1.1.1",
      "medias": [
        "video, sendonly, 96 H264/90000",
        "audio, sendonly, 8 PCMA/8000"
      ],
      "tracks": [
        "96 H264/90000, sinks=2",
        "8 PCMA/8000, sinks=1"
      ],
      "recv": 6683208
    },
    {
      "type": "RTSP source",
      "url": "rtsp://localhost:8554/f32a01ce52b009cdf58ea3f09916514f",
      "remote_addr": "[::1]:38472",
      "user_agent": "ffmpeg/go2rtc",
      "medias": [
        "audio, sendonly, 96 MPEG4-GENERIC/8000"
      ],
      "tracks": [
        "96 MPEG4-GENERIC/8000, sinks=2"
      ],
      "recv": 1105530
    }
  ],
  "consumers": [
    {
      "type": "RTSP client",
      "url": "rtsp://localhost:8554/rua?audio",
      "remote_addr": "[::1]:38460",
      "user_agent": "go2rtc/ffmpeg",
      "medias": [
        "audio, recvonly, 96 PCMA/8000"
      ],
      "tracks": [
        "96 PCMA/8000, sinks=1"
      ],
      "send": 2554408
    },
    {
      "type": "RTSP client",
      "url": "rtsp://home.felipecrs.com:8554/rua?mp4",
      "remote_addr": "192.168.1.15:46476",
      "user_agent": "LibVLC/3.0.18 (LIVE555 Streaming Media v2016.11.28)",
      "medias": [
        "video, recvonly, 96 H264/90000",
        "audio, recvonly, 97 MPEG4-GENERIC/8000"
      ],
      "tracks": [
        "96 H264/90000, sinks=2",
        "97 MPEG4-GENERIC/8000, sinks=2"
      ],
      "recv": 6832,
      "send": 5232622
    },
    {
      "type": "RTSP client",
      "url": "rtsp://127.0.0.1:8554/rua?audio=aac",
      "remote_addr": "127.0.0.1:38440",
      "medias": [
        "audio, recvonly, 96 MPEG4-GENERIC/8000"
      ],
      "tracks": [
        "96 MPEG4-GENERIC/8000, sinks=2"
      ],
      "send": 1053958
    },
    {
      "type": "RTSP client",
      "url": "rtsp://home.felipecrs.com:8554/rua?video=copy",
      "remote_addr": "192.168.1.15:46531",
      "user_agent": "LibVLC/3.0.18 (LIVE555 Streaming Media v2016.11.28)",
      "medias": [
        "video, recvonly, 96 H264/90000"
      ],
      "tracks": [
        "96 H264/90000, sinks=2"
      ],
      "recv": 2352,
      "send": 2753232
    }
  ]
}
{
  "producers": [
    {
      "type": "RTSP source",
      "url": "rtsp://192.168.1.33:554/0/av0",
      "remote_addr": "192.168.1.33:554",
      "user_agent": "go2rtc/1.1.1",
      "medias": [
        "video, sendonly, 96 H264/90000",
        "audio, sendonly, 8 PCMA/8000"
      ],
      "tracks": [
        "96 H264/90000, sinks=2",
        "8 PCMA/8000, sinks=1"
      ],
      "recv": 2226459
    },
    {
      "type": "RTSP source",
      "url": "rtsp://127.0.0.1:8554/rua?audio=aac",
      "remote_addr": "127.0.0.1:8554",
      "user_agent": "go2rtc/1.1.1",
      "medias": [
        "audio, sendonly, 96 MPEG4-GENERIC/8000"
      ],
      "tracks": [
        "96 MPEG4-GENERIC/8000, sinks=1"
      ],
      "recv": 522608
    }
  ],
  "consumers": [
    {
      "type": "RTSP client",
      "url": "rtsp://home.felipecrs.com:8554/rua_hd?mp4",
      "remote_addr": "192.168.1.15:46485",
      "user_agent": "LibVLC/3.0.18 (LIVE555 Streaming Media v2016.11.28)",
      "medias": [
        "video, recvonly, 96 H264/90000",
        "audio, recvonly, 97 MPEG4-GENERIC/8000"
      ],
      "tracks": [
        "96 H264/90000, sinks=2",
        "97 MPEG4-GENERIC/8000, sinks=1"
      ],
      "recv": 3304,
      "send": 11449917
    },
    {
      "type": "RTSP client",
      "url": "rtsp://home.felipecrs.com:8554/rua_hd?video=copy\u0026audio=copy",
      "remote_addr": "192.168.1.15:46520",
      "user_agent": "LibVLC/3.0.18 (LIVE555 Streaming Media v2016.11.28)",
      "medias": [
        "video, recvonly, 96 H264/90000",
        "audio, recvonly, 97 PCMA/8000"
      ],
      "tracks": [
        "96 H264/90000, sinks=2",
        "97 PCMA/8000, sinks=1"
      ],
      "recv": 1736,
      "send": 6512208
    }
  ]
}

Logs:

12:10:53.148 INF go2rtc version 1.1.1 linux/amd64
12:10:53.150 INF [api] listen addr=:1984
12:10:53.151 INF [rtsp] listen addr=:8554
12:10:53.153 INF [srtp] listen addr=:8443
12:10:53.153 INF [webrtc] listen addr=:8555
12:11:09.626 DBG [rtsp] new consumer stream=rua
12:11:09.626 DBG [streams] probe producer url=rtsp://admin:12345@192.168.1.33:554/0/av1
12:11:09.633 DBG [streams] probe producer url=ffmpeg:rua#audio=aac
12:11:09.633 DBG [exec] run url="exec:ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://localhost:8554/rua?audio -vn -c:a aac -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://localhost:8554/f32a01ce52b009cdf58ea3f09916514f"
12:11:09.672 DBG [rtsp] new consumer stream=rua
12:11:09.674 DBG [streams] start producer url=rtsp://admin:12345@192.168.1.33:554/0/av1
12:11:09.768 DBG [exec] run launch=134.686391ms
12:11:09.768 DBG [streams] start producer url=ffmpeg:rua#audio=aac
12:11:24.047 DBG [rtsp] new consumer stream=rua_hd
12:11:24.047 DBG [streams] probe producer url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:11:24.054 DBG [streams] probe producer url=rtsp://127.0.0.1:8554/rua?audio=aac
12:11:24.054 DBG [rtsp] new consumer stream=rua
12:11:24.054 DBG [streams] start producer url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:11:24.054 DBG [streams] start producer url=rtsp://127.0.0.1:8554/rua?audio=aac
12:12:37.163 DBG [rtsp] new consumer stream=rua_hd
12:12:37.163 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:12:52.454 DBG [rtsp] new consumer stream=rua
12:12:58.259 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:12:58.265 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:04.343 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:04.343 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:07.362 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:07.362 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:07.762 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:07.766 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:08.085 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:08.085 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:16.468 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:16.470 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:19.444 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:19.444 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:22.495 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:13:22.495 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:29.265 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:29.271 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:32.287 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:32.291 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:32.706 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:32.716 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:41.330 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:41.336 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:47.382 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:47.382 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:56.455 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:14:56.460 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:15:08.655 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:15:08.660 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:15:29.847 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:15:29.853 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:15:30.213 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:15:30.219 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:16:33.515 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="RTSP wrong input" url=rtsp://admin:12345@192.168.1.33:554/0/av0
12:16:33.515 DBG [streams] reconnect to url=rtsp://admin:12345@192.168.1.33:554/0/av0

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 22 (22 by maintainers)

Most upvoted comments

Could that be the reason of the issue?

One of my reolink cams (Reolink Duo 2) has a much worse time over WiFi producing a lot of these errors meanwhile on ethernet it is rock solid

Ok

Well… isn’t that what I sent? lol