@apocaliss92/scrypted-reolink-native 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apocaliss92/scrypted-reolink-native",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Use any reolink camera with Scrypted, even older/unsupported models without HTTP protocol support",
5
5
  "author": "@apocaliss92",
6
6
  "license": "Apache",
package/src/camera.ts CHANGED
@@ -618,15 +618,38 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
618
618
  },
619
619
  pipMargin: {
620
620
  title: 'PIP Margin',
621
- description: 'Margin from edge in pixels',
621
+ description: 'Margin from edge as a fraction of the output size (e.g. 0.01 = 1%). Values > 1 are treated as pixels (legacy).',
622
622
  type: 'number',
623
- defaultValue: 10,
623
+ defaultValue: 0.01,
624
624
  group: 'Composite stream',
625
625
  hide: true,
626
626
  onPut: async () => {
627
627
  this.scheduleStreamManagerRestart('pipMargin changed');
628
628
  },
629
629
  },
630
+
631
+ compositeAssumeH264: {
632
+ title: 'Composite: Assume H.264 Inputs',
633
+ description: 'Assume both wider+tele inputs are H.264 (skips codec detection). Recommended when using sub+sub on TrackMix. If inputs are actually H.265, the composite may fail to start.',
634
+ type: 'boolean',
635
+ defaultValue: true,
636
+ group: 'Composite stream',
637
+ hide: true,
638
+ onPut: async () => {
639
+ this.scheduleStreamManagerRestart('compositeAssumeH264 changed');
640
+ },
641
+ },
642
+ compositeDisableTranscode: {
643
+ title: 'Composite: Disable Codec Transcode (Best-effort)',
644
+ description: 'Best-effort knob. Overlay requires re-encode in ffmpeg; this option only avoids HEVC->H264 codec assumptions when possible. Leave off unless you know what you are doing.',
645
+ type: 'boolean',
646
+ defaultValue: false,
647
+ group: 'Composite stream',
648
+ hide: true,
649
+ onPut: async () => {
650
+ this.scheduleStreamManagerRestart('compositeDisableTranscode changed');
651
+ },
652
+ },
630
653
  });
631
654
 
632
655
  ptzPresets = new ReolinkPtzPresets(this);
@@ -1541,7 +1564,7 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
1541
1564
  };
1542
1565
 
1543
1566
  if (this.isMultiFocal) {
1544
- const { pipPosition, pipSize, pipMargin, rtspChannel } = this.storageSettings.values;
1567
+ const { pipPosition, pipSize, pipMargin, rtspChannel, compositeAssumeH264, compositeDisableTranscode } = this.storageSettings.values;
1545
1568
 
1546
1569
  // On NVR/Hub, TrackMix lenses are selected via stream variant, not via a separate channel.
1547
1570
  // Use rtspChannel for BOTH wide and tele so the library can request tele via streamType/variant.
@@ -1583,6 +1606,10 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
1583
1606
  pipSize,
1584
1607
  pipMargin,
1585
1608
  onNvr: this.isOnNvr,
1609
+ // Prefer H.264 for composite (sub+sub by default) to reduce GOP latency.
1610
+ forceH264: true,
1611
+ assumeH264Inputs: compositeAssumeH264 ?? true,
1612
+ disableTranscode: compositeDisableTranscode ?? false,
1586
1613
  };
1587
1614
  }
1588
1615