#Video playback broken

1 messages · Page 1 of 1 (latest)

finite pewter
#

Storage template migration moves VIDEO files on disk but does not update asset.originalPath in DB

It doesn't seem I did anything in particular but suddenly most of my videos are broken even though they are playable from hard disk as you can see as per screenshots.

I did rerun the template folder tasks as well as the video tasks, but everything stays the same.On mobile it just hangs, which seems to confirm it's not restricted to web.

After running the Storage Template Migration job with an album-based template,
The issue affects all assets (any type) that were physically relocated by the migration job. originalPath was not updated for these assets because the job crashed during the removeEmptyDirs cleanup step before the DB update could complete. Assets uploaded after the migration ran are unaffected, as the storage template is applied correctly at upload time.

modest cometBOT
#

:wave: Hey @finite pewter,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

modest cometBOT
finite pewter
#

Observed state (reproduction steps unclear)

The exact sequence of events that led to this state is uncertain. What is confirmed:

  • Storage Template Migration was run with an album-based template ({{album}}/{{filename}})
  • After the job completed, all VIDEO assets have stale originalPath values while IMAGE assets are correct
  • move_history contains correct entries for all 863 affected videos, meaning the move was recorded — but asset.originalPath was never updated to match

The consistent 863/863 match between stale records and move_history entries suggests this is systematic rather than random.

Expected behavior

asset.originalPath is updated for all asset types including VIDEO after a successful migration.

#

Evidence

File is physically at the correct new path:

/data/library/admin/2025/Stage Jazz au vert 2025/so_what.mp4  ✓ exists

move_history records the correct mapping:

SELECT "oldPath", "newPath" FROM move_history 
WHERE "newPath" LIKE '%so_what.mp4';
-- oldPath:  /data/library/admin/2025/07/so_what.mp4
-- newPath:  /data/library/admin/2025/Stage Jazz au vert 2025/so_what.mp4

asset.originalPath is stale:

SELECT "originalPath" FROM asset WHERE "originalFileName" = 'so_what.mp4';
-- /data/library/admin/2025/07/so_what.mp4  ✗ file does not exist here

Scale — 863 VIDEO assets affected, all with a matching entry in move_history:

SELECT COUNT(*) FROM asset 
WHERE type = 'VIDEO' 
AND "originalPath" ~ '/[0-9]{4}/[0-9]{2}/';
-- 863

SELECT COUNT(*) FROM asset a
JOIN move_history m ON m."oldPath" = a."originalPath"
WHERE a.type = 'VIDEO'
AND a."originalPath" ~ '/[0-9]{4}/[0-9]{2}/';
-- 863

Server logs

All failures occur for VIDEO assets , across multiple formats (.mp4, .mov)

ENOENT: /data/library/admin/2025/07/so_what.mp4
ENOENT: /data/library/admin/2025/07/nicas_dream.mp4
ENOENT: /data/library/admin/2025/07/20250719_232135.mp4
ENOENT: /data/library/admin/2025/07/20250719_232846.mp4
ENOENT: /data/library/admin/2025/07/20250719_230308.mp4
ENOENT: /data/library/admin/2025/07/IMG_8822.mov

Environment

  • Immich version: v2.6.3
  • Install method: Docker Compose
  • Storage template: {{album}}/{{filename}}
finite pewter