Closed bt90 closed 1 year ago
This is very odd, as the thumbnail generation should have nothing to do with the ffmpeg settings in the admin page. Could you please upload your server and microservice logs?
I may have been too quick to open the issue. Apparently the job to regenerate thumbnails, as noted in the v1.52.0 release notes, is still running.
But the main point of the ticket still stands. A missing or broken thumbnail shouldn't hide an asset from the UI.
hmm...maybe there's something wrong with the folder structure?
Just tried to upload a new video
[Nest] 1 - 04/08/2023, 10:24:14 AM LOG [MediaService] Start encoding video 5c5a7669-c0d7-4398-b896-39856256bfee -crf 23,-preset ultrafast,-vcodec h264,-acodec aac,-movflags faststart,-vf scale=720:-2
[Nest] 1 - 04/08/2023, 10:24:25 AM LOG [MediaService] Start Generating Video Thumbnail
[Nest] 1 - 04/08/2023, 10:24:25 AM ERROR [MediaService] Failed to generate thumbnail for asset: 5c5a7669-c0d7-4398-b896-39856256bfee/VIDEO
Error: ffmpeg exited with code 1: upload/upload/93a0810e-2003-41cf-be5e-2dd8d5a052dc/36d03dfc-a944-40f7-8172-b6cd5f360cf8.mp4: No such file or directory
at ChildProcess.<anonymous> (/usr/src/app/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
[Nest] 1 - 04/08/2023, 10:24:33 AM LOG [MediaService] Encoding success 5c5a7669-c0d7-4398-b896-39856256bfee
As it's the newest file, it is displayed in the Explore
tab. So the fallback to a grey tile works here:
Note that the video preview works perfectly fine:
Is this possibly related to the folder structure changes introduced in v1.52.0 ?
To sum it up:
This looks like a timing issue. The next few sample uploads all worked perfectly fine. Triggering the job to regenerate missing thumbnails fixed the broken ones.
Two separate things:
The get all assets endpoint does indeed filter out assets without a thumbnail.
There is a bug related to storage template being applied after exif extraction and that messing up the path for other jobs. You can run encode on missing to fix that specific error.
I'd think showing assets without a thumbnail is a good idea and a potential enhancement, but not the way it currently works today.
I changed the title to reflect the problem.
Related to #2142
Just for reference but the issue is not limited to videos. I had to generate missing thumbnails for three of my recent photos from the last week in order for them to show up in the web UI and get the synchronized indicator in the app.
I believed this was fixed/added in #2561
The bug
I switched immichs video encoding from h264 to hevc and tried to upload a test video from my Android device. The test file seemingly finished the upload process and is present in the library folder. Immich also assigned an asset UUID to it but it is completely missing in the web UI.
The following error pops up in the browser console:
The file itself can be properly downloaded if i manually craft the URL:
https://immich.example.com/api/asset/download/1f95d6b0-0acd-410c-81a7-3aa9e2e9207e?key=
This seems to also confuse the Android client:
My biggest gripe with this issue is not that the video thumbnail generation seems to fail but that immich hides the file from the UI if there's no thumbnail. Can we at least add some kind of fallback here? Even a grey tile would be fine.
The OS that Immich Server is running on
Ubuntu 22.04
Version of Immich Server
v1.53.0
Version of Immich Mobile App
v1.53.0 build.76
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
No response