mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-18 14:18:21 +03:00
fix: swap shape indices in birdseye custom logo assignment
In BirdsEyeFrameManager.__init__(), the numpy slice that copies the custom logo (transparent_layer from custom.png alpha channel) onto blank_frame has shape[0] and shape[1] swapped: blank_frame[y:y+shape[1], x:x+shape[0]] = transparent_layer shape[0] is rows (height) and shape[1] is cols (width), so the row range needs shape[0] and the column range needs shape[1]: blank_frame[y:y+shape[0], x:x+shape[1]] = transparent_layer The bug is masked for square images where shape[0]==shape[1]. For non-square images (e.g. 1920x1080), it produces: ValueError: could not broadcast input array from shape (1080,1920) into shape (1620,1080) This silently kills the birdseye output process -- no frames are written to the FIFO pipe, go2rtc exec ffmpeg times out, and the birdseye restream shows a black screen with no errors in the UI.
This commit is contained in:
parent
5a214eb0d1
commit
6bcd6a59c7
@ -307,8 +307,8 @@ class BirdsEyeFrameManager:
|
|||||||
y_offset = height // 2 - transparent_layer.shape[0] // 2
|
y_offset = height // 2 - transparent_layer.shape[0] // 2
|
||||||
x_offset = width // 2 - transparent_layer.shape[1] // 2
|
x_offset = width // 2 - transparent_layer.shape[1] // 2
|
||||||
self.blank_frame[
|
self.blank_frame[
|
||||||
y_offset : y_offset + transparent_layer.shape[1],
|
y_offset : y_offset + transparent_layer.shape[0],
|
||||||
x_offset : x_offset + transparent_layer.shape[0],
|
x_offset : x_offset + transparent_layer.shape[1],
|
||||||
] = transparent_layer
|
] = transparent_layer
|
||||||
else:
|
else:
|
||||||
logger.warning("Unable to read Frigate logo")
|
logger.warning("Unable to read Frigate logo")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user