mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
set shortest edge to preview height (#11971)
This commit is contained in:
parent
0d862d6aa8
commit
15e2df1e5c
@ -152,9 +152,19 @@ class PreviewRecorder:
|
|||||||
self.start_time = 0
|
self.start_time = 0
|
||||||
self.last_output_time = 0
|
self.last_output_time = 0
|
||||||
self.output_frames = []
|
self.output_frames = []
|
||||||
|
if config.detect.width > config.detect.height:
|
||||||
self.out_height = PREVIEW_HEIGHT
|
self.out_height = PREVIEW_HEIGHT
|
||||||
self.out_width = (
|
self.out_width = (
|
||||||
int((config.detect.width / config.detect.height) * self.out_height) // 4 * 4
|
int((config.detect.width / config.detect.height) * self.out_height)
|
||||||
|
// 4
|
||||||
|
* 4
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
self.out_width = PREVIEW_HEIGHT
|
||||||
|
self.out_height = (
|
||||||
|
int((config.detect.height / config.detect.width) * self.out_width)
|
||||||
|
// 4
|
||||||
|
* 4
|
||||||
)
|
)
|
||||||
|
|
||||||
# create communication for finished previews
|
# create communication for finished previews
|
||||||
|
Loading…
Reference in New Issue
Block a user