[PR #20629] fix: video thumbnail generation for short videos #16611

Closed
opened 2026-02-05 16:07:59 +03:00 by OVERLORD · 0 comments
Owner

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

State: closed
Merged: Yes


Description

ffmpeg gives conversion failed with error 234 for short mp4 files (less than 10s) that where converted from m2ts. Longer videos work fine.

It looks like ffmpeg has no frames left to use for generating a thumbnail.

How Has This Been Tested?

  • Short mp4 file (converted from m2ts) now does generate a thumbnail correctly
  • Other mp4 file still generates the same thumbnail as before

Note: this seems to fix mts file thumbnail generation, the fix from 14134 might not be needed anymore.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)
**Original Pull Request:** https://github.com/immich-app/immich/pull/20629 **State:** closed **Merged:** Yes --- ## Description ffmpeg gives conversion failed with error 234 for short mp4 files (less than 10s) that where converted from m2ts. Longer videos work fine. It looks like ffmpeg has no frames left to use for generating a thumbnail. ## How Has This Been Tested? - [x] Short mp4 file (converted from m2ts) now does generate a thumbnail correctly - [x] Other mp4 file still generates the same thumbnail as before Note: this seems to fix mts file thumbnail generation, the fix from [14134](https://github.com/immich-app/immich/pull/14134) might not be needed anymore. ## Checklist: - [x] I have performed a self-review of my own code - [x] I have made corresponding changes to the documentation if applicable - [x] I have no unrelated changes in the PR. - [x] I have confirmed that any new dependencies are strictly necessary. - [x] I have written tests for new code (if applicable) - [x] I have followed naming conventions/patterns in the surrounding code - [x] All code in `src/services/` uses repositories implementations for database calls, filesystem operations, etc. - [x] All code in `src/repositories/` is pretty basic/simple and does not have any immich specific logic (that belongs in `src/services/`)
OVERLORD added the pull-request label 2026-02-05 16:07:59 +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#16611