New Terminal Output:

root@f3f8d6319494:/app# python3 -c "
> import struct
> with open('/app/frames.tza', 'rb') as f:
>     f.read(4)  # magic
>     w, h = struct.unpack('<HH', f.read(4))
>     n_frames, max_bytes = struct.unpack('<II', f.read(8))
>
>     frames = []
>     for i in range(n_frames):
>         frame_data = f.read(w*h)
>         frames.append(frame_data)
>
>     # Analyze a frame with many changes (frame 3->4 has 321 changes)
>     prev, curr = frames[3], frames[4]
>     changes = []
>     for j in range(w*h):
>         if prev[j] != curr[j]:
>             row = j // w
>             col = j % w
>             changes.append((row, col, prev[j], curr[j]))
>
>     print(f'Frame 3->4: {len(changes)} changes')
>     # Group by row
>     by_row = {}
>     for r, c, old, new in changes:
>         by_row.setdefault(r, []).append((c, old, new))
>     for r in sorted(by_row.keys()):
>         cols = sorted(by_row[r])
>         print(f'  Row {r}: cols {[c for c,_,_ in cols]}')
> "
Frame 3->4: 321 changes
  Row 1: cols [5, 28, 29, 56]
  Row 2: cols [6, 9, 10, 11, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 33, 34, 35, 37, 39, 40]
  Row 3: cols [6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
  Row 4: cols [6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40]
  Row 5: cols [6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41]
  Row 6: cols [6, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42]
  Row 7: cols [6, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42]
  Row 8: cols [6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]
  Row 9: cols [6, 16, 17, 19, 20, 21, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44]
  Row 10: cols [6, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 21, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44]
  Row 11: cols [5, 6, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]
root@f3f8d6319494:/app#
