blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.06k stars 1.74k forks source link

[Camera Support]: Trying to use frigate with Provision ISR 8800 L2 DVR #6893

Closed francoisj1 closed 1 year ago

francoisj1 commented 1 year ago

Describe the problem you are having

I have a Provision ISR 8800 L2 DVR and want to connect the 8 cameras on the DVR along with my other IP cameras to Frigate. I had great success with all the RTSP stream cameras and IP cameras, yet the DVR cameras I am struggling to find the right string to connect it. Any help will be appreciated.

The DVR uses a username and password to login with administrative rights. On the mobile app, I am able to connect to the DVR and it makes use of port 6036. When doing a wireshark and fing scan, the port is “hidden” and only port 80 shows up on the scans.

I am trying RTSP strings and HTTP strings from Connect to Provision cameras to see if with no luck (almost went through all of them now). Further exploring the connection of GOTO RTC with strings from another thread to convert the FFMPEG to MJPEG even with a high CPU overhead as a warning. No luck yet. Below the extract of the code proposed but not connecting.

go2rtc: streams: mjpeg_cam: "ffmpeg:http://IP_OF_DVR:6036/videostream.cgi?user=admin&pwd=password

Other parameters configured only does motion as a minimum

Version

SYSTEM 0.12.1-367D724

Frigate config file

mqtt:
  host: a0d7b954-emqx
  user: "xxxxxxx"
  password: "xxxxxxx"
cameras:

#camera for Tapo 4 - this one works, next section an issue
  Tapo1:
    ffmpeg:
      inputs:
         - path: rtsp://xxxxxxxx:xxxxxxx@IPAddy:554/stream1
           roles:
            - detect
            - record
            - rtmp
    rtmp: 
      enabled: True
    record: 
      enabled: True
    snapshots: 
      enabled: True
    detect: 
      enabled: True
      width: 1280
      height: 1080
    objects:
      track:
      - person
      - cars

# this is the section I am having trouble with, want to connect to the DVR on port 6036 on any stream of the 8 cameras ----->>>>>

  mjpeg_cam:
    ffmpeg:
      inputs:
        - path: rtsp://10.0.0.250:6036/mjpeg_cam
          roles:
            - detect
go2rtc:
  streams:
    mjpeg_cam: "ffmpeg:http://10.0.0.250:6036/videostream.cgi?user=admin&pwd=xxxxxxxxx&resolution=32&rate=0#video=h264#hardware"           
    detect: 
      enabled: True
      width: 1280
      height: 1080
    objects:
      track:
      - person

Relevant log output

2023-06-23 06:04:00.038827192  [2023-06-23 08:04:00] frigate.video                  ERROR   : mjpeg_cam: Unable to read frames from ffmpeg process.
2023-06-23 06:04:00.038831970  [2023-06-23 08:04:00] frigate.video                  ERROR   : mjpeg_cam: ffmpeg process is not running. exiting capture thread...
2023-06-23 06:04:04.850153874  [2023-06-23 08:04:04] watchdog.mjpeg_cam             ERROR   : Ffmpeg process crashed unexpectedly for mjpeg_cam.
2023-06-23 06:04:04.850159942  [2023-06-23 08:04:04] watchdog.mjpeg_cam             ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-06-23 06:04:04.850162748  [2023-06-23 08:04:04] ffmpeg.mjpeg_cam.detect        ERROR   : rtsp://10.0.0.250:6036/mjpeg_cam: Invalid data found when processing input
2023-06-23 06:04:10.059115826  [2023-06-23 08:04:10] frigate.video                  ERROR   : mjpeg_cam: Unable to read frames from ffmpeg process.
2023-06-23 06:04:10.059120979  [2023-06-23 08:04:10] frigate.video                  ERROR   : mjpeg_cam: ffmpeg process is not running. exiting capture thread...
2023-06-23 06:04:14.872119005  [2023-06-23 08:04:14] watchdog.mjpeg_cam             ERROR   : Ffmpeg process crashed unexpectedly for mjpeg_cam.
2023-06-23 06:04:14.872123893  [2023-06-23 08:04:14] watchdog.mjpeg_cam             ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-06-23 06:04:14.872126613  [2023-06-23 08:04:14] ffmpeg.mjpeg_cam.detect        ERROR   : rtsp://10.0.0.250:6036/mjpeg_cam: Invalid data found when processing input
2023-06-23 06:04:20.060404915  [2023-06-23 08:04:20] frigate.video                  ERROR   : mjpeg_cam: Unable to read frames from ffmpeg process.
2023-06-23 06:04:20.060945735  [2023-06-23 08:04:20] frigate.video                  ERROR   : mjpeg_cam: ffmpeg process is not running. exiting capture thread...
2023-06-23 06:04:24.885491735  [2023-06-23 08:04:24] watchdog.mjpeg_cam             ERROR   : Ffmpeg process crashed unexpectedly for mjpeg_cam.
2023-06-23 06:04:24.885497459  [2023-06-23 08:04:24] watchdog.mjpeg_cam             ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-06-23 06:04:24.885500249  [2023-06-23 08:04:24] ffmpeg.mjpeg_cam.detect        ERROR   : rtsp://10.0.0.250:6036/mjpeg_cam: Invalid data found when processing input
2023-06-23 06:04:30.017431102  [2023-06-23 08:04:30] frigate.video                  ERROR   : mjpeg_cam: Unable to read frames from ffmpeg process.
2023-06-23 06:04:30.017626870  [2023-06-23 08:04:30] frigate.video                  ERROR   : mjpeg_cam: ffmpeg process is not running. exiting capture thread...
2023-06-23 06:04:34.890191393  [2023-06-23 08:04:34] watchdog.mjpeg_cam             ERROR   : Ffmpeg process crashed unexpectedly for mjpeg_cam.
2023-06-23 06:04:34.890396237  [2023-06-23 08:04:34] watchdog.mjpeg_cam             ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-06-23 06:04:34.890483452  [2023-06-23 08:04:34] ffmpeg.mjpeg_cam.detect        ERROR   : rtsp://10.0.0.250:6036/mjpeg_cam: Invalid data found when processing input

FFprobe output from your camera

Output from DVR not giving any errors orther than forcing the session closed due to connection:

Open_Input: Immediate exit requested

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Provision ISR DVR - SA-8800 L2

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

Based on your link the path for rtsp should be /profile1

what are the logs for that?

francoisj1 commented 1 year ago

Hi there

Thanks for the response. Attached and below, hope it is in line with the information you need?

Take note, I am trying to connect to a DVR and not a IP camera.

The output from the player and the logs as follows. The one thing I keep picking up in the error log is that the FFMPEG process cannot provide a feed or is is not running, but the rest of my cameras are working fine??

2023-06-23 14:41:49.061778152 [2023-06-23 16:41:49] frigate.video ERROR : mjpeg_cam: Unable to read frames from ffmpeg process. 2023-06-23 14:41:49.064588440 [2023-06-23 16:41:49] frigate.video ERROR : mjpeg_cam: ffmpeg process is not running. exiting capture thread... 2023-06-23 14:42:03.917155309 [2023-06-23 16:42:03] watchdog.mjpeg_cam ERROR : Ffmpeg process crashed unexpectedly for mjpeg_cam. 2023-06-23 14:42:03.917160260 [2023-06-23 16:42:03] watchdog.mjpeg_cam ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-06-23 14:42:03.917165270 [2023-06-23 16:42:03] ffmpeg.mjpeg_cam.detect ERROR : http://10.0.0.250:6036/mjpeg_cam: Connection timed out 2023-06-23 14:42:09.300232130 [2023-06-23 16:42:09] frigate.video ERROR : mjpeg_cam: Unable to read frames from ffmpeg process. 2023-06-23 14:42:09.300237108 [2023-06-23 16:42:09] frigate.video ERROR : mjpeg_cam: ffmpeg process is not running. exiting capture thread... 2023-06-23 14:42:13.980753222 [2023-06-23 16:42:13] watchdog.mjpeg_cam ERROR : Ffmpeg process crashed unexpectedly for mjpeg_cam. 2023-06-23 14:42:13.980758093 [2023-06-23 16:42:13] watchdog.mjpeg_cam ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-06-23 14:42:13.980760567 [2023-06-23 16:42:13] ffmpeg.mjpeg_cam.detect ERROR : http://10.0.0.250:6036/mjpeg_cam: Connection timed out 2023-06-23 14:42:19.179623110 [2023-06-23 16:42:19] frigate.video ERROR : mjpeg_cam: Unable to read frames from ffmpeg process. 2023-06-23 14:42:19.179638356 [2023-06-23 16:42:19] frigate.video ERROR : mjpeg_cam: ffmpeg process is not running. exiting capture thread... 2023-06-23 14:42:23.994775239 [2023-06-23 16:42:23] watchdog.mjpeg_cam ERROR : Ffmpeg process crashed unexpectedly for mjpeg_cam. 2023-06-23 14:42:23.994780684 [2023-06-23 16:42:23] watchdog.mjpeg_cam ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-06-23 14:42:23.994782920 [2023-06-23 16:42:23] ffmpeg.mjpeg_cam.detect ERROR : http://10.0.0.250:6036/mjpeg_cam: Connection timed out 2023-06-23 14:42:29.197984914 [2023-06-23 16:42:29] frigate.video ERROR : mjpeg_cam: Unable to read frames from ffmpeg process. 2023-06-23 14:42:29.198293255 [2023-06-23 16:42:29] frigate.video ERROR : mjpeg_cam: ffmpeg process is not running. exiting capture thread... 2023-06-23 14:42:33.254718360 [2023-06-23 16:42:33] frigate.video ERROR : V380_2: Unable to read frames from ffmpeg process. 2023-06-23 14:42:33.255222171 [2023-06-23 16:42:33] frigate.video ERROR : V380_2: ffmpeg process is not running. exiting capture thread... 2023-06-23 14:42:33.926809362 [2023-06-23 16:42:33] watchdog.V380_2 ERROR : Ffmpeg process crashed unexpectedly for V380_2. 2023-06-23 14:42:33.927191683 [2023-06-23 16:42:33] watchdog.V380_2 ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-06-23 14:42:33.927201462 [2023-06-23 16:42:33] ffmpeg.V380_2.detect ERROR : [segment @ 0x559a1e3035c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly 2023-06-23 14:42:33.927206508 [2023-06-23 16:42:33] ffmpeg.V380_2.detect ERROR : [flv @ 0x559a1e263b80] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly 2023-06-23 14:42:33.927252595 [2023-06-23 16:42:33] ffmpeg.V380_2.detect ERROR : [segment @ 0x559a1e3035c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file. 2023-06-23 14:42:33.927346269 [2023-06-23 16:42:33] ffmpeg.V380_2.detect ERROR : ***@***.***/live/ch00_1: Connection timed out 2023-06-23 14:42:33.928021547 [2023-06-23 16:42:33] ffmpeg.V380_2.detect ERROR : Last message repeated 1 times 2023-06-23 14:42:33.928026714 [2023-06-23 16:42:33] ffmpeg.V380_2.detect ERROR : [flv @ 0x559a1e263b80] Failed to update header with correct duration. 2023-06-23 14:42:33.928030454 [2023-06-23 16:42:33] ffmpeg.V380_2.detect ERROR : [flv @ 0x559a1e263b80] Failed to update header with correct filesize. 2023-06-23 14:42:34.017951319 [2023-06-23 16:42:34] watchdog.mjpeg_cam ERROR : Ffmpeg process crashed unexpectedly for mjpeg_cam. 2023-06-23 14:42:34.019550455 [2023-06-23 16:42:34] watchdog.mjpeg_cam ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-06-23 14:42:34.020787390 [2023-06-23 16:42:34] ffmpeg.mjpeg_cam.detect ERROR : http://10.0.0.250:6036/mjpeg_cam: Connection timed out 2023-06-23 14:42:39.211863403 [2023-06-23 16:42:39] frigate.video ERROR : mjpeg_cam: Unable to read frames from ffmpeg process. 2023-06-23 14:42:39.212196510 [2023-06-23 16:42:39] frigate.video ERROR : mjpeg_cam: ffmpeg process is not running. exiting capture thread... 2023-06-23 14:42:44.050930805 [2023-06-23 16:42:44] watchdog.mjpeg_cam ERROR : Ffmpeg process crashed unexpectedly for mjpeg_cam. 2023-06-23 14:42:44.051302090 [2023-06-23 16:42:44] watchdog.mjpeg_cam ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-06-23 14:42:44.051306239 [2023-06-23 16:42:44] ffmpeg.mjpeg_cam.detect ERROR : http://10.0.0.250:6036/mjpeg_cam: Connection timed out 2023-06-23 14:42:49.174830119 [2023-06-23 16:42:49] frigate.video ERROR : mjpeg_cam: Unable to read frames from ffmpeg process. 2023-06-23 14:42:49.175035550 [2023-06-23 16:42:49] frigate.video ERROR : mjpeg_cam: ffmpeg process is not running. exiting capture thread...

Code:

mjpeg_cam: ffmpeg: inputs:

From: Nicolas Mowen @.> Date: Friday, 23 June 2023 at 14:51 To: blakeblackshear/frigate @.> Cc: francoisj1 @.>, Author @.> Subject: Re: [blakeblackshear/frigate] [Camera Support]: Trying to use frigate with Provision ISR 8800 L2 DVR (Issue #6893)

Based on your link the path for rtsp should be /profile1

what are the logs for that?

— Reply to this email directly, view it on GitHubhttps://github.com/blakeblackshear/frigate/issues/6893#issuecomment-1604238912, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APNODWIVEWSELRVLGCARKZTXMWGLTANCNFSM6AAAAAAZRD7DSU. You are receiving this because you authored the thread.Message ID: @.***>

NickM-27 commented 1 year ago

Let's not use go2rtc right now. Just do a basic config like it shows in https://docs.frigate.video/frigate/camera_setup

francoisj1 commented 1 year ago

Hi

Still no luck, error is connection refused,,, This the code entered now and looks the same as my other cameras that are working.

camera for DVR Provision_DVR: ffmpeg: inputs:

I het an error that connection refused:

2023-06-23 14:57:28.345098403 [2023-06-23 16:57:28] ffmpeg.Provision_DVR.detect ERROR : [tcp @ 0x55faa0c6e640] Connection to tcp://10.0.0.250:554?timeout=5000000 failed: Connection refused 2023-06-23 14:57:28.345111157 [2023-06-23 16:57:28] ffmpeg.Provision_DVR.detect ERROR : @.***/stream1: Connection refused

From: Nicolas Mowen @.> Date: Friday, 23 June 2023 at 16:51 To: blakeblackshear/frigate @.> Cc: francoisj1 @.>, Author @.> Subject: Re: [blakeblackshear/frigate] [Camera Support]: Trying to use frigate with Provision ISR 8800 L2 DVR (Issue #6893)

Let's not use go2rtc right now. Just do a basic config like it shows in https://docs.frigate.video/frigate/camera_setup

— Reply to this email directly, view it on GitHubhttps://github.com/blakeblackshear/frigate/issues/6893#issuecomment-1604394182, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APNODWJGYBQW7N477ZEUFCTXMWUNJANCNFSM6AAAAAAZRD7DSU. You are receiving this because you authored the thread.Message ID: @.***>

NickM-27 commented 1 year ago

Then that's the answer, doesn't seem possible unless there is some hack to get it to accept the connection.

francoisj1 commented 1 year ago

Thanks for the guidance.

Checking in how other DVR connections are made with provision. I have a piece of software on my machine called CMS3 that reads all the info fine. Don’t know what encoding it is reading? Tried sniffing with Wireshark and Fing, no luck on a string or encoding header ☹

I checked in the Provision and they not responsive at all for just over 2 weeks now.

See attached.

Regards, F!

From: Nicolas Mowen @.> Date: Friday, 23 June 2023 at 17:04 To: blakeblackshear/frigate @.> Cc: francoisj1 @.>, Author @.> Subject: Re: [blakeblackshear/frigate] [Camera Support]: Trying to use frigate with Provision ISR 8800 L2 DVR (Issue #6893)

Then that's the answer, doesn't seem possible unless there is some hack to get it to accept the connection.

— Reply to this email directly, view it on GitHubhttps://github.com/blakeblackshear/frigate/issues/6893#issuecomment-1604415816, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APNODWMU4POQKESOJ6BSRH3XMWWBRANCNFSM6AAAAAAZRD7DSU. You are receiving this because you authored the thread.Message ID: @.***>

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.