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

Todo: Full processing of the second stream from the camera #4208

Open
IgorA100 opened this issue Jan 27, 2025 · 4 comments
Open

Todo: Full processing of the second stream from the camera #4208

IgorA100 opened this issue Jan 27, 2025 · 4 comments

Comments

@IgorA100
Copy link
Contributor

IgorA100 commented Jan 27, 2025

I think that full processing of the second stream from the camera is necessary, and not just audio processing.
This would eliminate some problems/inconveniences for high-resolution cameras:

  • On Montage Page it is impossible to display RTSP stream simultaneously for 5 or more cameras, because the stream from each camera is 10-15 Mbit/s, and most Internet channels (not counting the local network) have a bandwidth of 30-100 Mbit/s. If ffmpeg is used for display, then a very powerful processor is required so that its core is not loaded to 100%
  • There will be no need to create a second monitor for the same camera to analyze motion detection.

I suggest discussing this problem.
I could implement the Frontend part, but I am not very familiar with the Backend part yet.

I previously mentioned it here: #3815

@connortechnology
Copy link
Member

Mostly just needs Monitor elements to which stream to record and which to do analysis on. I recently added code to select a different video stream when the container contains multiple video streams so adding another couple lines is trivial.

Live view needs to transition away from mjpeg. Need to switch to webrtc. But that is a separate issue.

@IgorA100
Copy link
Contributor Author

which stream to record and which to do analysis on

Yes.

I recently added code to select a different video stream

Great!
Are there any methods I can call via AJAX?

Need to switch to webrtc.

Yes, of course, I agree.

@IgorA100
Copy link
Contributor Author

IgorA100 commented Feb 1, 2025

@connortechnology
If you could make changes to the file "src/zm_monitor_rtsp2web.cpp" I would be grateful!
It is necessary to add a second stream to the "config.json" file belonging to RTSPToWeb
As a result, the "config.json" file should look something like this:

    "6": {
      "channels": {
        "0": {
          "name": "ch1",
          "on_demand": true,
          "url": "rtsp://name:pass@1ХХ.1ХХ.1ХХ.2ХХ:554/main"
        },
        "1": {
          "name": "ch2",
          "on_demand": true,
          "url": "rtsp://name:pass@1ХХ.1ХХ.1ХХ.2ХХ:554/third"
        }
      },
      "name": "Camera_Name"
    }

rtsp://name:pass@1ХХ.1ХХ.1ХХ.2ХХ:554/main is: "rtsp_path"

Everything else To support displaying the second channel using RTSPToWeb I will do it myself.

@IgorA100
Copy link
Contributor Author

IgorA100 commented Feb 1, 2025

To transmit audio, you need to add one line to the parameters.
That is, it should look like this:

    "6": {
      "channels": {
        "0": {
          "name": "ch1",
          "audio": true,
          "on_demand": true,
          "url": "rtsp://name:pass@1ХХ.1ХХ.1ХХ.2ХХ:554/main"
        },
        "1": {
          "name": "ch2",
          "audio": true,
          "on_demand": true,
          "url": "rtsp://name:pass@1ХХ.1ХХ.1ХХ.2ХХ:554/third"
        }
      },
      "name": "Camera_Name"
    }

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

2 participants