immich/server
mrwogu f995056ac4 fix(server): normalize probePackets values to prevent int32 overflow
probePackets() accumulates raw ffprobe packet values in time_base units
without normalization. When time_base has a large denominator (e.g.
nanosecond 1/1e9 from IP cameras) or when PTS values use the MPEG-TS
absolute clock (~5.5e9 at 90kHz), the accumulated values overflow
int32 columns in asset_keyframe (totalDuration, pts, accDuration,
ownDuration), causing PostgresError during AssetExtractMetadata.

Two normalization strategies applied:
1. Subtract first PTS from all packets (handles MPEG-TS absolute PTS
   clock that starts at ~5.5e9 regardless of clip length)
2. Rescale all values when timeBase > 90000 (handles nanosecond
   time_base where any clip > 2.1s overflows int32)

The rescaled timeBase is returned in VideoPacketInfo and used for
asset_video.timeBase, preserving the fps ratio used by HLS.

Fixes #29600
2026-07-29 17:41:09 +02:00
..
bin fix(server): memory fragmentation (#27027) 2026-03-26 18:21:52 +01:00
src fix(server): normalize probePackets values to prevent int32 overflow 2026-07-29 17:41:09 +02:00
test chore: medium tests system config helpers (#30174) 2026-07-24 21:27:31 +02:00
.gitignore feat(web): re-add open graph tags for public share links (#5635) 2023-12-11 13:37:47 -06:00
.npmignore chore: use pnpm for builds (#19752) 2025-08-19 08:55:24 -04:00
.prettierignore refactor: migrate map repository to kysely (#15348) 2025-01-17 09:14:42 -06:00
.prettierrc fix(server): lint import order (#3974) 2023-09-04 21:45:59 +02:00
Dockerfile chore(deps): update ghcr.io/jdx/mise docker tag to v2026.7.15 (#30301) 2026-07-28 11:36:43 +02:00
Dockerfile.dev chore(deps): update ghcr.io/jdx/mise docker tag to v2026.7.15 (#30301) 2026-07-28 11:36:43 +02:00
eslint.config.mjs chore(deps): update dependency eslint-plugin-unicorn to v72 (#30092) 2026-07-21 15:33:46 +02:00
helmet.json fix(server): updated default CSP config to support videos from V3 player (#29830) 2026-07-15 12:49:18 +02:00
mise.toml refactor: plugin sdk types (#28674) 2026-05-28 22:04:15 +00:00
nest-cli.json fix: isolate docker host/container filesystem for node_modules and build output (#21167) 2025-08-24 13:09:45 -05:00
package.json chore: version v3.1.0 2026-07-27 18:20:33 +00:00
tsconfig.build.json chore: move .tsbuildinfo file to dist folder (#27682) 2026-04-10 16:02:25 +02:00
tsconfig.json chore(deps): update dependency eslint-plugin-unicorn to v70 - abandoned (#29684) 2026-07-20 23:47:14 -04:00