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

set rateControl with setVideoEncoderConfiguration #348

Open
romv99 opened this issue Dec 3, 2024 · 0 comments
Open

set rateControl with setVideoEncoderConfiguration #348

romv99 opened this issue Dec 3, 2024 · 0 comments

Comments

@romv99
Copy link

romv99 commented Dec 3, 2024

I am currently working on modifying the encoder settings of a Bosch Dinion 3000IR camera. While I have successfully edited the quality and resolution properties, I am encountering difficulties with the rateControl property. Despite multiple attempts with values form videoEncoderConfigurationOptions, changes to rateControl do not seem to take effect.

Here an example of the object I use with setVideoEncoderConfiguration:

const configParams = {
    "$": {
        "token": "EncCfg_L1S2",
        "GovLength": 255,
        "Profile": "Main"
    },
    "name": "Balanced",
    "useCount": 1,
    "encoding": "H264",
    "resolution": {
        "width": 768,
        "height": 432
    },
    "rateControl": {
        "frameRateLimit": 30,
        "encodingInterval": 1,
        "bitrateLimit": 3400
    },
    "multicast": {
        "address": {
            "type": "IPv4",
            "IPv4Address": "0.0.0.0"
        },
        "port": 60010,
        "TTL": 64,
        "autoStart": false
    },
    "quality": 50
}

my implementation of the function:

const camera = new Cam({
                hostname: device.network.ip,
                username: process.env.ONVIF_USER,
                password: process.env.ONVIF_PWD,
                port: 80,
            }, function (err) {
                if (err) {
                    return reject(err);
                }
                camera.setVideoEncoderConfiguration(configParams, (err) => {
                    if (err) {
                        console.log(err)
                        return reject(err);
                    }
                    resolve();
                })
            });

and options for video Encoder :

[
    {
        "$": {
            "GovLengthRange": "1 255",
            "FrameRatesSupported": "30.0 15.0 10.0 7.5 6.0 5.0 4.2 3.75 3.0 2.0 1.0",
            "ProfilesSupported": "Main",
            "ConstantBitRateSupported": false
        },
        "encoding": "H264",
        "qualityRange": {
            "min": 0,
            "max": 100
        },
        "resolutionsAvailable": [
            {
                "width": 1920,
                "height": 1080
            },
            {
                "width": 1536,
                "height": 864
            },
            {
                "width": 1280,
                "height": 720
            },
            {
                "width": 768,
                "height": 432
            },
            {
                "width": 512,
                "height": 288
            }
        ],
        "bitrateRange": {
            "min": 1,
            "max": 80000
        }
    },
    {
        "$": {
            "GovLengthRange": "1 255",
            "FrameRatesSupported": "30.0 15.0 10.0 7.5 6.0 5.0 4.2 3.75 3.0 2.0 1.0",
            "ProfilesSupported": "Main",
            "ConstantBitRateSupported": false
        },
        "encoding": "H265",
        "qualityRange": {
            "min": 0,
            "max": 100
        },
        "resolutionsAvailable": [
            {
                "width": 1920,
                "height": 1080
            },
            {
                "width": 1536,
                "height": 864
            },
            {
                "width": 1280,
                "height": 720
            },
            {
                "width": 768,
                "height": 432
            },
            {
                "width": 512,
                "height": 288
            }
        ],
        "bitrateRange": {
            "min": 1,
            "max": 80000
        }
    }
]

Capabilities information:

Informations:

  • Device manufacturer : Bosch
  • Device model: Dinion 3100ir
  • Node.js version 21.7.3

Additional context
I use the library with a backend API based on NestJS.

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

1 participant