Skip to content

Commit

Permalink
Merge pull request #131 from thieren/next
Browse files Browse the repository at this point in the history
Fix aborted streaming
  • Loading branch information
thieren authored Aug 6, 2022
2 parents 661092d + 10cef31 commit 6f1829b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 27 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,6 @@ dist

.github/workflows/

.angular
.angular

homebridge-ui/
21 changes: 3 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,13 @@

You can find the complete detailled changelog for every beta release [here](https://github.com/homebridge-eufy-security/plugin/releases).

## 2.1.0-beta.14 (01/08/2022) - latest changes

### Added

- Presets (`copy`, `performance`) for advanced video config
- Setting to choose audio sample rate

### Changed

- Refactored ffmpeg processing
- Updated eufy-security-client to 2.1.2
- Deprecated options `forcerefreshsnap` and `useEnhancedSnapshotBehaviour` were removed and will no longer be evaluated
- Removed `mapvideo`, `mapaudio`, `maxDelay` and `forceMax` options from advanced VideoConfig since they are deprecated
- By default the plugin will now use one ffmpeg process for video and audio - this can be controlled via an option (`useSeparateProcesses` is now used instead of `useOneProcess`)
## 2.1.0-rc.1 - latest changes

### Fixed

- Fix issue that streams were only rendered in 640x480 - see #46
- Fixed smartlocks - see #110
- Fixed occasional EPIPE Error when streaming - see #14
- Streams might have been aborted after 30-60 seconds due to stream backpressuring

## 2.1.0 (beta) - complete changes of the beta so far (19/07/2022)
## 2.1.0 (RC)

### Added

Expand Down
16 changes: 8 additions & 8 deletions src/plugin/utils/ffmpeg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,11 +593,11 @@ export class FFmpeg extends EventEmitter {
this.stdin = this.process.stdin;
this.stdout = this.process.stdout;

if (this.parameters[0].debug) {
this.process.stderr.on('data', (chunk) => {
this.process.stderr.on('data', (chunk) => {
if (this.parameters[0].debug) {
this.log.debug(this.name, 'ffmpeg log message:\n' + chunk.toString());
});
}
}
});

this.process.on('error', this.onProcessError.bind(this));
this.process.on('exit', this.onProcessExit.bind(this));
Expand All @@ -615,11 +615,11 @@ export class FFmpeg extends EventEmitter {
return new Promise((resolve, reject) => {
this.process = spawn(this.ffmpegExec, processArgs.join(' ').split(/\s+/), { env: process.env });

if (this.parameters[0].debug) {
this.process.stderr.on('data', (chunk) => {
this.process.stderr.on('data', (chunk) => {
if (this.parameters[0].debug) {
this.log.debug(this.name, 'ffmpeg log message:\n' + chunk.toString());
});
}
}
});

const killTimeout = setTimeout(() => {
this.stop();
Expand Down

0 comments on commit 6f1829b

Please sign in to comment.