@scrypted/prebuffer-mixin 0.1.181 → 0.1.182

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": "@scrypted/prebuffer-mixin",
3
- "version": "0.1.181",
3
+ "version": "0.1.182",
4
4
  "description": "Rebroadcast and Prebuffer for VideoCameras.",
5
5
  "author": "Scrypted",
6
6
  "license": "Apache-2.0",
package/src/main.ts CHANGED
@@ -472,6 +472,17 @@ class PrebufferSession {
472
472
  // create missing pts from dts so mpegts and mp4 muxing does not fail
473
473
  const extraInputArguments = this.storage.getItem(this.ffmpegInputArgumentsKey) || DEFAULT_FFMPEG_INPUT_ARGUMENTS;
474
474
  ffmpegInput.inputArguments.unshift(...extraInputArguments.split(' '));
475
+ // Add SPS/PPS to all keyframes. Not all cameras do this!
476
+ // This isn't really necessary for a few reasons:
477
+ // MPEG-TS and MP4 will automatically do this, since there's no out of band
478
+ // way to get the SPS/PPS.
479
+ // RTSP mode may send the SPS/PPS out of band via the sdp, and then may not have
480
+ // SPS/PPS in the bit stream.
481
+ // Adding this argument isn't strictly necessary, but it normalizes the bitstream
482
+ // so consumers that expect the SPS/PPS will have it. Ran into an issue where
483
+ // the HomeKit plugin was blasting RTP packets out from RTSP mode,
484
+ // but the bitstream had no SPS/PPS information, resulting in the video never loading
485
+ // in the Home app.
475
486
  ffmpegInput.inputArguments.push('-bsf:v', 'dump_extra');
476
487
  session = await startParserSession(ffmpegInput, rbo);
477
488
  }