immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
48.73k stars 2.55k forks source link

Unable to run job handler. Error: extract_area: bad extract area #12731

Open zynexiz opened 4 weeks ago

zynexiz commented 4 weeks ago

The bug

I have a lot of video clips in my collection, and about half of them (I think) have thumbnail and the rest don't. I have tried recreating them several times, but it always says 250+ remaining every time I do it. From the logs it seems to be related to Sharp (there's a bunch of bug reports in that repo about this error message to). I'm not sure what distinguish the working video clips from the non working ones, feels kinda random.

Note; hoovering the video starts playing the preview, so everything else is working.

Namnlös

The OS that Immich Server is running on

Arch Linux

Version of Immich Server

1.115.0-1

Version of Immich Mobile App

1.115.0

Platform with the issue

Your docker-compose.yml content

Don't use docker.

Your .env content

Don't use docker.

Reproduction steps

  1. Upload videos
  2. Se if any of them fails to generate thumbnail

Relevant log output

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '<REDACTED>****.MOV':
sep 15 16:24:03 kvm-immich immich-microservices[406]:   Metadata:
sep 15 16:24:03 kvm-immich immich-microservices[406]:     major_brand     : qt
sep 15 16:24:03 kvm-immich immich-microservices[406]:     minor_version   : 0
sep 15 16:24:03 kvm-immich immich-microservices[406]:     compatible_brands: qt
sep 15 16:24:03 kvm-immich immich-microservices[406]:     creation_time   : 2019-10-04T13:55:37.000000Z
sep 15 16:24:03 kvm-immich immich-microservices[406]:     original_format : Digital Camera
sep 15 16:24:03 kvm-immich immich-microservices[406]:     original_format-eng: Digital Camera
sep 15 16:24:03 kvm-immich immich-microservices[406]:     comment         : FUJIFILM DIGITAL CAMERA X100S
sep 15 16:24:03 kvm-immich immich-microservices[406]:     comment-eng     : FUJIFILM DIGITAL CAMERA X100S
sep 15 16:24:03 kvm-immich immich-microservices[406]:   Duration: 00:10:00.60, start: 0.000000, bitrate: 38173 kb/s
sep 15 16:24:03 kvm-immich immich-microservices[406]:   Stream #0:0[0x1](eng): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, 36623 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
sep 15 16:24:03 kvm-immich immich-microservices[406]:       Metadata:
sep 15 16:24:03 kvm-immich immich-microservices[406]:         creation_time   : 2019-10-04T13:55:37.000000Z
sep 15 16:24:03 kvm-immich immich-microservices[406]:         vendor_id       : [0][0][0][0]
sep 15 16:24:03 kvm-immich immich-microservices[406]:         encoder         : AVC Coding
sep 15 16:24:03 kvm-immich immich-microservices[406]:   Stream #0:1[0x2](eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
sep 15 16:24:03 kvm-immich immich-microservices[406]:       Metadata:
sep 15 16:24:03 kvm-immich immich-microservices[406]:         creation_time   : 2019-10-04T13:55:37.000000Z
sep 15 16:24:03 kvm-immich immich-microservices[406]:         vendor_id       : [0][0][0][0]
sep 15 16:24:03 kvm-immich immich-microservices[406]: [out#0/webp @ 0x5e306b5c7e80] No explicit maps, mapping streams automatically...
sep 15 16:24:03 kvm-immich immich-microservices[406]: [vost#0:0/libwebp_anim @ 0x5e306b5c85c0] Created video stream from input stream 0:0
sep 15 16:24:03 kvm-immich immich-microservices[406]: [Parsed_scale_5 @ 0x5e306b5ca2c0] Value 601.000000 for parameter 'out_color_matrix' out of range [0 - 14]
sep 15 16:24:03 kvm-immich immich-microservices[406]: Error applying option 'out_color_matrix' to filter 'scale': Numerical result out of range
sep 15 16:24:03 kvm-immich immich-microservices[406]: [Parsed_fps_0 @ 0x5e306b8279c0] 0 frames in, 0 frames out; 0 frames dropped, 0 frames duplicated.
sep 15 16:24:03 kvm-immich immich-microservices[406]: [vost#0:0/libwebp_anim @ 0x5e306b5c85c0] Error initializing a simple filtergraph
sep 15 16:24:03 kvm-immich immich-microservices[406]: Error opening output file<REDACTED>/thumbs/ac9ba1a6-c3f6-4678-8f31-7fbedb1a7ec9/4b/26/4b2624f5-2e62-4721-8834-166d4b323378-preview.webp.
sep 15 16:24:03 kvm-immich immich-microservices[406]: Error opening output files: Numerical result out of range
sep 15 16:24:03 kvm-immich immich-microservices[406]: [AVIOContext @ 0x5e306b5cc4c0] Statistics: 678998 bytes read, 2 seeks
sep 15 16:24:03 kvm-immich immich-microservices[406]: 
sep 15 16:24:03 kvm-immich immich-microservices[406]: [Nest] 406  - 2024-09-15 16:24:03   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-preview): Error: ffmpeg exited with code 222: 
sep 15 16:24:03 kvm-immich immich-microservices[406]: [Nest] 406  - 2024-09-15 16:24:03   ERROR [Microservices:JobService] Error: ffmpeg exited with code 222:
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at ChildProcess.<anonymous> (/usr/lib/immich/app/server/node_modules/fluent-ffmpeg/lib/processor.js:180:22)
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at ChildProcess.emit (node:events:520:28)
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
sep 15 16:24:03 kvm-immich immich-microservices[406]: [Nest] 406  - 2024-09-15 16:24:03   ERROR [Microservices:JobService] Object:
sep 15 16:24:03 kvm-immich immich-microservices[406]: {
sep 15 16:24:03 kvm-immich immich-microservices[406]:   "id": "4b2624f5-2e62-4721-8834-166d4b323378"
sep 15 16:24:03 kvm-immich immich-microservices[406]: }
[Nest] 406  - 2024-09-15 16:24:03   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-person-thumbnail): Error: extract_area: bad extract area
sep 15 16:24:03 kvm-immich immich-microservices[406]: [Nest] 406  - 2024-09-15 16:24:03   ERROR [Microservices:JobService] Error: extract_area: bad extract area
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at Sharp.toFile (/usr/lib/immich/app/server/node_modules/sharp/lib/output.js:90:19)
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at MediaRepository.generateThumbnail (/usr/lib/immich/app/server/dist/repositories/media.repository.js:69:14)
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at PersonService.handleGeneratePersonThumbnail (/usr/lib/immich/app/server/dist/services/person.service.js:453:36)
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at async /usr/lib/immich/app/server/dist/services/job.service.js:148:36
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at async Worker.processJob (/usr/lib/immich/app/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
sep 15 16:24:03 kvm-immich immich-microservices[406]:     at async Worker.retryIfFailed (/usr/lib/immich/app/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
sep 15 16:24:03 kvm-immich immich-microservices[406]: [Nest] 406  - 2024-09-15 16:24:03   ERROR [Microservices:JobService] Object:

Additional information

No response

taixingyiji commented 3 weeks ago

I have the same issue here, so I rolled back to version 1.114.0.

zynexiz commented 2 weeks ago

Any update on this issue? Still have the same problem in version 1.116.2.

pekmop1024 commented 1 week ago

Same with 1.117.0

peterbeck commented 3 days ago

I have the same issue here, so I rolled back to version 1.114.0.

can confirm - everything works fine with 1.114.0, but back to 1.117.0 breaks thumbnail for new photos

an0o0nym commented 14 hours ago

Hi, I have the same issue. So what did you do after downgrading to 1.114.0? Did you remove and upload again the wrong photo?

Clicking on regenerate thumbnail/metadata doesnt work for me.

pekmop1024 commented 14 hours ago

For me it helped to downgrade and regenerate thumbnails. But there are some videos that still without thumbnails, but it's rare ones, not all of them. Maybe 5 or 10 from 4000+.