Skip to content

Commit

Permalink
v5.0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
seydx committed Apr 23, 2022
1 parent 8db6c85 commit 133f42d
Show file tree
Hide file tree
Showing 7 changed files with 919 additions and 1,995 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Changelog
All notable changes to this project will be documented in this file.

# v5.0.22 - 2022-04-23

## Other Changes
- Improved probe stream (camera.ui)
- Improved HKSV recordings process
- Minor improvements
- Bump dependencies

## Bugfixes
- Fixed an issue where recording information such as motion label was not correctly saved in the image data (camera.ui)
- Fixed an issue where prebuffering and/or video analysis was started for disabled cameras anyway
- Fixed an issue where disabling a camera in config.json also removed it from config.json
- Minor bugfixes

# v5.0.21 - 2022-04-23

## Notable Changes
Expand Down
5 changes: 4 additions & 1 deletion config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@
"title": "Name",
"type": "string",
"required": true,
"description": "Set the camera name for display in the Home app."
"description": "Set the camera name for display in the Home app.",
"condition": {
"functionBody": "return model.cameras[arrayIndices[0]].disable !== true;"
}
},
"manufacturer": {
"name": "Manufacturer",
Expand Down
2,873 changes: 890 additions & 1,983 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-camera-ui",
"version": "5.0.21",
"version": "5.0.22",
"description": "User Interface for RTSP capable cameras with HSV support.",
"author": "SeydX (https://github.com/SeydX/homebridge-camera-ui)",
"scripts": {
Expand All @@ -14,8 +14,8 @@
"main": "index.js",
"dependencies": {
"@homebridge/plugin-ui-utils": "^0.0.19",
"camera.ui": "^1.1.11",
"ffmpeg-for-homebridge": "^0.0.9",
"camera.ui": "^1.1.13",
"ffmpeg-for-homebridge": "0.0.9",
"fs-extra": "10.1.0",
"pick-port": "^1.0.0"
},
Expand Down
4 changes: 0 additions & 4 deletions services/config/config.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ export default class Config {
return;
}

if (camera.disable) {
this.log.warn(`${camera.name} is disabled in config.json, the camera will be ignored`, camera.name);
return;
}
const sourceArguments = camera.videoConfig.source.split(/\s+/);

if (!sourceArguments.includes('-i')) {
Expand Down
4 changes: 3 additions & 1 deletion src/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export class HomebridgeCameraUI {
const device = { ...camera };
const uuid = this.api.hap.uuid.generate(device.name);

if (this.devices.has(uuid)) {
if (camera.disable) {
this.log.warn(`${camera.name} is disabled in config.json, the camera will be ignored.`, camera.name);
} else if (this.devices.has(uuid)) {
this.log.warn(
'Multiple devices are configured with this name. Duplicate device will be skipped.',
device.name,
Expand Down
8 changes: 5 additions & 3 deletions src/services/recording.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,18 @@ export default class RecordingDelegate {
//'-maxrate',
//`${videoBitrate}k`,
//'-r',
//fps.toString(),
//`${fps}`,
'-vf',
//It looks like if FPS is fixed at 25 instead of 30, it reduces the probability of HSV breaking.
`framerate=fps=${fps},scale=w=${width}:h=${height}:force_original_aspect_ratio=1,pad=${width}:${height}:(ow-iw)/2:(oh-ih)/2`,
//`scale=w=${width}:h=${height}:force_original_aspect_ratio=1,pad=${width}:${height}:(ow-iw)/2:(oh-ih)/2`,
`framerate=fps=${fps}*1000/1001,scale=w=${width}:h=${height}:force_original_aspect_ratio=1,pad=${width}:${height}:(ow-iw)/2:(oh-ih)/2`,
//'-fflags',
//'+genpts+discardcorrupt',
//'-reset_timestamps',
//'1',
'-force_key_frames',
`expr:gte(t,n_forced*${iFrameInterval / 1000})`
//'-vsync',
//'2'
);

if (this.accessory.context.config.hksvConfig?.encoderOptions) {
Expand Down

0 comments on commit 133f42d

Please sign in to comment.