Skip to content

Commit

Permalink
snapshot: include ffmpeg path
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 18, 2023
1 parent b80ac7c commit f717e87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/snapshot/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/snapshot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/snapshot",
"version": "0.0.51",
"version": "0.0.52",
"description": "Snapshot Plugin for Scrypted",
"scripts": {
"scrypted-setup-project": "scrypted-setup-project",
Expand Down
3 changes: 3 additions & 0 deletions plugins/snapshot/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ class SnapshotMixin extends SettingsMixinDeviceBase<Camera> implements Camera {
picture = await this.cropAndScale(picture);
if (needSoftwareResize) {
picture = await ffmpegFilterImageBuffer(picture, {
ffmpegPath: await mediaManager.getFFmpegPath(),
console: this.debugConsole,
resize: options?.picture,
});
Expand Down Expand Up @@ -352,6 +353,7 @@ class SnapshotMixin extends SettingsMixinDeviceBase<Camera> implements Camera {
const ymax = Math.max(...this.storageSettings.values.snapshotCropScale.map(([x, y]) => y)) / 100;

return ffmpegFilterImageBuffer(buffer, {
ffmpegPath: await mediaManager.getFFmpegPath(),
console: this.debugConsole,
crop: {
fractional: true,
Expand Down Expand Up @@ -444,6 +446,7 @@ class SnapshotMixin extends SettingsMixinDeviceBase<Camera> implements Camera {
}
else {
return ffmpegFilterImageBuffer(errorBackground, {
ffmpegPath: await mediaManager.getFFmpegPath(),
console: this.debugConsole,
blur: true,
brightness: -.2,
Expand Down

0 comments on commit f717e87

Please sign in to comment.