[PR #11610] fix(server): video duration extraction #13291

Closed
opened 2026-02-05 15:12:11 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/immich-app/immich/pull/11610

State: closed
Merged: Yes


Extracting the video duration based on EXIF data has proven to be unreliable. Exiftool has 7 different ways for calculating the Duration value, and if any of those are missing or invalid the duration will also be wrong. Using ffprobe is a more reliable solution to determine the video duration.

Using an MKV test file the duration is now correctly extracted as 00:01:27.336, whereas it was previously 24:15:36.000. This should fix #7312 and fix #8244, though I can't verify that myself

**Original Pull Request:** https://github.com/immich-app/immich/pull/11610 **State:** closed **Merged:** Yes --- Extracting the video duration based on EXIF data has proven to be unreliable. Exiftool has [7 different ways](https://exiftool.org/TagNames/Composite.html) for calculating the `Duration` value, and if any of those are missing or invalid the duration will also be wrong. Using `ffprobe` is a more reliable solution to determine the video duration. Using an [MKV test file](https://github.com/ietf-wg-cellar/matroska-test-files/blob/e6965e5ca666322ed93e2748a10a4f132309e005/test_files/test1.mkv) the duration is now correctly extracted as `00:01:27.336`, whereas it was previously `24:15:36.000`. This should fix #7312 and fix #8244, though I can't verify that myself
OVERLORD added the pull-request label 2026-02-05 15:12:11 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#13291