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:
ryzendigo 2026-03-16 14:23:05 +08:00
parent 5a214eb0d1
commit 6bcd6a59c7

View File

@ -307,8 +307,8 @@ class BirdsEyeFrameManager:
y_offset = height // 2 - transparent_layer.shape[0] // 2
x_offset = width // 2 - transparent_layer.shape[1] // 2
self.blank_frame[
y_offset : y_offset + transparent_layer.shape[1],
x_offset : x_offset + transparent_layer.shape[0],
y_offset : y_offset + transparent_layer.shape[0],
x_offset : x_offset + transparent_layer.shape[1],
] = transparent_layer
else:
logger.warning("Unable to read Frigate logo")