diff --git a/plugins/onvif/package-lock.json b/plugins/onvif/package-lock.json index 71920cb1d..e9eecb102 100644 --- a/plugins/onvif/package-lock.json +++ b/plugins/onvif/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/onvif", - "version": "0.0.55", + "version": "0.0.56", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/onvif", - "version": "0.0.55", + "version": "0.0.56", "license": "Apache", "dependencies": { "@koush/axios-digest-auth": "^0.8.5", diff --git a/plugins/onvif/package.json b/plugins/onvif/package.json index 831bf4401..6d605e407 100644 --- a/plugins/onvif/package.json +++ b/plugins/onvif/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/onvif", - "version": "0.0.55", + "version": "0.0.56", "description": "ONVIF Camera Plugin for Scrypted", "author": "Scrypted", "license": "Apache", diff --git a/plugins/onvif/src/main.ts b/plugins/onvif/src/main.ts index f1aadccff..a180535f4 100644 --- a/plugins/onvif/src/main.ts +++ b/plugins/onvif/src/main.ts @@ -271,7 +271,9 @@ class OnvifProvider extends RtspProvider { interfaces: this.getInterfaces(), }); const device = await this.getDevice(urn) as OnvifCamera; + const onvifUrl = new URL(xaddrs) device.setIPAddress(rinfo.address); + device.setHttpPortOverride(onvifUrl.port); this.log.a('Discovered ONVIF Camera. Complete setup by providing login credentials.'); } ); diff --git a/plugins/rtsp/src/rtsp.ts b/plugins/rtsp/src/rtsp.ts index a7e82cff2..6a348e1e8 100644 --- a/plugins/rtsp/src/rtsp.ts +++ b/plugins/rtsp/src/rtsp.ts @@ -120,6 +120,7 @@ export class RtspCamera extends ScryptedDeviceBase implements Camera, VideoCamer url.password = password; const ret: FFMpegInput = { + url: url.toString(), inputArguments: [ "-rtsp_transport", "tcp", @@ -434,6 +435,10 @@ export abstract class RtspSmartCamera extends RtspCamera { return `${this.getIPAddress()}:${this.storage.getItem('httpPort') || 80}`; } + setHttpPortOverride(port: string) { + this.storage.setItem('httpPort', port); + } + getRtspUrlOverride(options?: MediaStreamOptions) { if (!this.showRtspUrlOverride()) return;