Open Lukasdotcom opened 1 month ago
I'm encountering a similar issue when generating thumbnails for .MTS
files:
Input #0, mpegts, from '/usr/src/originals/20090818/20090818184909.mts':
Duration: 00:00:47.07, start: 0.800300, bitrate: 23889 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High), 1 reference frame (HDMV / 0x564D4448), yuv420p(top first, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
Correcting start time of Input #0 by 66733 us.
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> webp (libwebp_anim))
Press [q] to stop, [?] for help
[h264 @ 0x7fb0171580] Reinit context to 1920x1088, pix_fmt: yuv420p
[Parsed_thumbnail_1 @ 0x7fb01c0600] batch size: 12 frames
[Parsed_scale_5 @ 0x7fb01c0480] w:-2 h:250 flags:'lanczos+accurate_rnd+full_chroma_int' interl:0
[graph 0 input from stream 0:0 @ 0x7fb01c1140] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:1/1
[Parsed_fps_0 @ 0x7fb01c06c0] fps=12/1
[Parsed_scale_5 @ 0x7fb01c0480] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:444 h:250 fmt:yuv420p sar:1000/999 flags:0x00042200
EOF in input file 0
Terminating demuxer thread 0
[Parsed_fps_0 @ 0x7fb01c06c0] Set first pts to 6
Output #0, webp, to 'upload/thumbs/2c92e9aa-2d38-4f73-a2b4-8d0be2d782f7/fb/39/fb399d88-e94f-4eed-b510-12bdeec1a636-thumbnail.webp':
Metadata:
encoder : Lavf60.3.100
Stream #0:0: Video: webp, 1 reference frame, yuv420p, 444x250 (0x0) [SAR 1000:999 DAR 16:9], q=2-31, 200 kb/s, 12 fps, 1k tbn
Metadata:
encoder : Lavc60.3.100 libwebp_anim
frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
No more output streams to write to, finishing.
[libwebp encoder @ 0x7fb0180260] WebPAnimEncoderAssemble() failed with error: 1
[vost#0:0/libwebp_anim @ 0x7fb0620780] Error submitting video frame to the encoder
[Parsed_fps_0 @ 0x7fb01c06c0] 2 frames in, 0 frames out; 2 frames dropped, 0 frames duplicated.
[out#0/webp @ 0x7fb01c0b40] All streams finished
[out#0/webp @ 0x7fb01c0b40] Terminating muxer thread
[AVIOContext @ 0x7fb01902c0] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 0x7fb0190180] Statistics: 146143376 bytes read, 2 seeks
Conversion failed!
[Nest] 7 - 07/19/2024, 7:51:18 AM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnail): Error: ffmpeg exited with code 1: Conversion failed!
[Nest] 7 - 07/19/2024, 7:51:18 AM ERROR [Microservices:JobService] Error: ffmpeg exited with code 1: Conversion failed!
at ChildProcess.<anonymous> (/usr/src/app/node_modules/fluent-ffmpeg/lib/processor.js:180:22)
at ChildProcess.emit (node:events:519:28)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)
[Nest] 7 - 07/19/2024, 7:51:18 AM ERROR [Microservices:JobService] Object:
{
"id": "fb399d88-e94f-4eed-b510-12bdeec1a636"
}
I am running into the same issue as well.
[Nest] 23946 - 08/13/2024, 9:03:20 AM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnail): Error: ffmpeg exited with code 1: Conversion failed!
[Nest] 23946 - 08/13/2024, 9:03:20 AM ERROR [Microservices:JobService] Error: ffmpeg exited with code 1: Conversion failed!
at ChildProcess.<anonymous> (/app/immich/server/node_modules/fluent-ffmpeg/lib/processor.js:180:22)
at ChildProcess.emit (node:events:519:28)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)
[Nest] 23946 - 08/13/2024, 9:03:20 AM ERROR [Microservices:JobService] Object:
{
"id": "9659df3d-b342-4d4e-9cb7-40bb37a5bc5a"
}
[Nest] 23946 - 08/13/2024, 9:03:20 AM ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbhash): Error: Input file is missing: /photos/thumbs/35e586ac-e0a9-4612-a19b-0f910b5a071a/18/54/18543809-5289-4d86-9439-713db75e9b24-preview.jpeg
[Nest] 23946 - 08/13/2024, 9:03:20 AM ERROR [Microservices:JobService] Error: Input file is missing: /photos/thumbs/35e586ac-e0a9-4612-a19b-0f910b5a071a/18/54/18543809-5289-4d86-9439-713db75e9b24-preview.jpeg
at Sharp.toBuffer (/app/immich/server/node_modules/sharp/lib/output.js:161:17)
at MediaRepository.generateThumbhash (/app/immich/server/dist/repositories/media.repository.js:137:14)
at MediaService.handleGenerateThumbhash (/app/immich/server/dist/services/media.service.js:223:54)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /app/immich/server/dist/services/job.service.js:148:36
at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 23946 - 08/13/2024, 9:03:20 AM ERROR [Microservices:JobService] Object:
{
"id": "18543809-5289-4d86-9439-713db75e9b24"
}
[Nest] 23946 - 08/13/2024, 9:03:21 AM ERROR [Microservices:MediaRepository] ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
[mpegts @ 0x4a8b6190000] parser not found for codec hdmv_pgs_subtitle, packets or times may be invalid.
Last message repeated 1 times
[h264 @ 0x4a8b61d0400] Reinit context to 1440x1088, pix_fmt: yuv420p
Input #0, mpegts, from '/photos/library/admin/2014/2014-05-23/00020.MTS':
Duration: 00:00:02.02, start: 1.033367, bitrate: 12483 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High), 1 reference frame (HDMV / 0x564D4448), yuv420p(top first, left), 1440x1080 (1440x1088) [SAR 4:3 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Correcting start time of Input #0 by 66733 us.
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> webp (libwebp_anim))
Press [q] to stop, [?] for help
[h264 @ 0x4a8b61d3000] Reinit context to 1440x1088, pix_fmt: yuv420p
[Parsed_thumbnail_1 @ 0x4a8b61a8ac0] batch size: 12 frames
[Parsed_scale_5 @ 0x4a8b61a8b80] w:-2 h:250 flags:'lanczos+accurate_rnd+full_chroma_int' interl:0
[graph 0 input from stream 0:0 @ 0x4a8b61a8880] w:1440 h:1080 pixfmt:yuv420p tb:1/90000 fr:30000/1001 sar:4/3
[Parsed_fps_0 @ 0x4a8b61a8700] fps=12/1
[Parsed_scale_5 @ 0x4a8b61a8b80] w:1440 h:1080 fmt:yuv420p sar:4/3 -> w:334 h:250 fmt:yuv420p sar:2000/1503 flags:0x00042200
EOF in input file 0
Terminating demuxer thread 0
[Parsed_fps_0 @ 0x4a8b61a8700] Set first pts to 6
Output #0, webp, to '/photos/thumbs/35e586ac-e0a9-4612-a19b-0f910b5a071a/18/54/18543809-5289-4d86-9439-713db75e9b24-thumbnail.webp':
Metadata:
encoder : Lavf60.3.100
Stream #0:0: Video: webp, 1 reference frame, yuv420p, 334x250 (0x0) [SAR 2000:1503 DAR 16:9], q=2-31, 200 kb/s, 12 fps, 1k tbn
Metadata:
encoder : Lavc60.3.100 libwebp_anim
frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
No more output streams to write to, finishing.
[libwebp encoder @ 0x4a8b6d40140] WebPAnimEncoderAssemble() failed with error: 1
[vost#0:0/libwebp_anim @ 0x4a8b6190c00] Error submitting video frame to the encoder
[Parsed_fps_0 @ 0x4a8b61a8700] 2 frames in, 0 frames out; 2 frames dropped, 0 frames duplicated.
[out#0/webp @ 0x4a8b61a1080] All streams finished
[out#0/webp @ 0x4a8b61a1080] Terminating muxer thread
[AVIOContext @ 0x4a8b6d403c0] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 0x4a8b6040180] Statistics: 6590608 bytes read, 2 seeks
Conversion failed!
Same problem. Immich v1.112.1
Possible solutions:
The bug
Fails to transcode and generate thumbnail for the attached file. 00465.MTS.zip
The OS that Immich Server is running on
Fedora 39
Version of Immich Server
v1.107.2
Version of Immich Mobile App
N/A
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Relevant log output
Additional information
No response