Skip to content

Instantly share code, notes, and snippets.

@loadhigh
loadhigh / rstats_migration.md
Created May 20, 2026 16:31
Merlin rstats bandwidth history migration: 32-bit to 64-bit struct layout and conversion

Migrating Merlin rstats Bandwidth History: 32-bit to 64-bit Router

Background

Asuswrt-Merlin's rstats binary may be compiled as 32-bit ARM even on 64-bit hardware. The in-memory and on-disk struct layout differs between 32-bit and 64-bit builds due to uint64_t alignment rules, making data files from a 32-bit router unreadable by a 64-bit one and vice versa.

Data Format

The history file is a gzip-compressed history_t struct. Its size depends on how data_t is aligned.

@loadhigh
loadhigh / h265_to_mp4_conversion_guide.md
Last active May 17, 2026 21:53
H.265 to MP4 quick examples

H.265 to MP4 (Quick Guide)

Use FFmpeg to package raw .h265 CCTV exports into MP4.

1) Fast remux (no re-encode)

ffmpeg -y -fflags +genpts -r 25 -i input.h265 -c:v copy output.mp4

2) 1080N aspect-ratio fix (important)