go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Integrate iCatch DVR

Open fulviomeomartini opened this issue 2 years ago • 8 comments

Hi, I was unable to integrate my DVR in any way. I cannot find its RTSP URL even though I see that when I open the native app and establish a connection, Wireshark notifies me that the connection uses an RTSP stream. If I analyze the TCP stream, it tells me that it connects to the path: "/cgi-bin/net_video.cgi?hq=0&iframe=65535&pframe=65535&audio=0", but when I connect, it fails to extract the video stream. How can I find the URL and integrate it? I was only able to integrate an MJPEG stream, which is low quality, while with the native app (SoCatch), I can view in high definition. I found the low-resolution URL through the browser, which only allows connecting in high resolution through Internet Explorer and an ActiveX plugin. I have attached some Wireshark screenshots that may be helpful to you. The screeshots of go2rtc are in order of the configuration My configuration:

streams:
  casameomartini: http://admin:[email protected]:9000/cgi-bin/net_jpeg.cgi?ch=0&time=1696623164023
  casameomartini2: bubble://admin:[email protected]:9000/cgi-bin/net_video.cgi?hq=1&iframe=65535&pframe=65535&audio=65535
  casameomartini3: rtsp://admin:[email protected]:9000/cgi-bin/net_video.cgi?hq=1&iframe=65535&pframe=65535&audio=65535
  casameomartini4: dvrip://admin:[email protected]:9000/

Screenshot 2023-10-07 alle 12 39 30 Screenshot 2023-10-07 alle 12 12 04 Screenshot 2023-10-07 alle 12 43 24 Screenshot 2023-10-07 alle 12 43 38 Screenshot 2023-10-07 alle 12 44 07

fulviomeomartini avatar Oct 07 '23 11:10 fulviomeomartini

You can send Wireshark dumps to me in PM

AlexxIT avatar Oct 07 '23 12:10 AlexxIT

ok, i sent them on telegram

fulviomeomartini avatar Oct 07 '23 13:10 fulviomeomartini

@fulviomeomartini hello. did you manage to get the url for high resolution from icatch?

gurglingtonic avatar Feb 01 '24 10:02 gurglingtonic

Please let me know if the problem is relevant

AlexxIT avatar May 28 '24 14:05 AlexxIT

I actually haven't found a solution. My current solution is a url_path that, once clicked, opens the "socatch" app on my iPhone. I hope someone better than me will be able to integrate it

fulviomeomartini avatar May 28 '24 15:05 fulviomeomartini

What's your nick in Telegram? So I can check history.

AlexxIT avatar May 28 '24 18:05 AlexxIT

@meotapin

fulviomeomartini avatar May 28 '24 18:05 fulviomeomartini

I see. It's a pretty complicated protocol. I'm not likely to take it, but I'll leave the issue open.

AlexxIT avatar May 28 '24 20:05 AlexxIT

I would be very interested as well. If I can help out in any way, please tell me.

Did you already (kinda) understand the protocol @AlexxIT ?

AlexCherrypi avatar Jan 21 '25 00:01 AlexCherrypi

I figured it out. This is part of my frigate go2rtc config, but I think you can adapt this. Take note of the complete flag. Without that, the encoder uses h264 data partitioning and all moving objects leave behind weird traces.

The net_video.cgi seems to provide raw annexb h264 with data partitioning.

Obviously you can change the crf and whatnot. I just wanted to leave this info here, in case somebody needs it.

go2rtc:
  ffmpeg:

    dvr_reencode: >
      -loglevel warning
      -hwaccel none
      -c:v h264
      -fflags sortdts
      -err_detect ignore_err+compliant
      -rtbufsize 256M
      -max_interleave_delta 100000000
      -f h264 -i {input}
      -c:v libx264 -crf 15 -preset fast
      -r 25 -fps_mode cfr
      -g 250 -keyint_min 25
      -bsf:v h264_metadata=aud=insert,filter_units=remove_types=0|4|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
      -force_key_frames "expr:gte(t,n_forced*1)"
      -x264-params "scenecut=30:intra-refresh=1"

  streams:
    dvr-ch1:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=1&pframe=1&complete=1#input=dvr_reencode
    dvr-ch1-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=1&pframe=1&complete=1#input=dvr_reencode

    dvr-ch2:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=2&pframe=2&complete=1#input=dvr_reencode
    dvr-ch2-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=2&pframe=2&complete=1#input=dvr_reencode

    dvr-ch3:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=4&pframe=4&complete=1#input=dvr_reencode
    dvr-ch3-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=4&pframe=4&complete=1#input=dvr_reencode

    dvr-ch4:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=8&pframe=8&complete=1#input=dvr_reencode
    dvr-ch4-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=8&pframe=8&complete=1#input=dvr_reencode

    dvr-ch5:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=16&pframe=16&complete=1#input=dvr_reencode
    dvr-ch5-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=16&pframe=16&complete=1#input=dvr_reencode

    dvr-ch6:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=32&pframe=32&complete=1#input=dvr_reencode
    dvr-ch6-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=32&pframe=32&complete=1#input=dvr_reencode

    dvr-ch7:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=64&pframe=64&complete=1#input=dvr_reencode
    dvr-ch7-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=64&pframe=64&complete=1#input=dvr_reencode

    dvr-ch8:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=128&pframe=128&complete=1#input=dvr_reencode
    dvr-ch8-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=128&pframe=128&complete=1#input=dvr_reencode

    dvr-ch9:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=256&pframe=256&complete=1#input=dvr_reencode
    dvr-ch9-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=256&pframe=256&complete=1#input=dvr_reencode

    dvr-ch10:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=512&pframe=512&complete=1#input=dvr_reencode
    dvr-ch10-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=512&pframe=512&complete=1#input=dvr_reencode

    dvr-ch11:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=1&iframe=1024&pframe=1024&complete=1#input=dvr_reencode
    dvr-ch11-lq:
      ffmpeg:http://username:password@hostname/cgi-bin/net_video.cgi?hq=0&iframe=1024&pframe=1024&complete=1#input=dvr_reencode

AlexCherrypi avatar Aug 30 '25 20:08 AlexCherrypi