Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Transcode MTS File #10979

Closed
1 of 3 tasks
Lukasdotcom opened this issue Jul 9, 2024 · 3 comments
Closed
1 of 3 tasks

Unable to Transcode MTS File #10979

Lukasdotcom opened this issue Jul 9, 2024 · 3 comments
Assignees

Comments

@Lukasdotcom
Copy link
Contributor

Lukasdotcom commented Jul 9, 2024

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

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:328fe6a5822256d065debb36617a8169dbfbd77b797c525288e465f56c1d392b
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    command: ["postgres", "-c" ,"shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]
    restart: always

volumes:
  model-cache:
    external: true

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/SAMSUNG/immich
# The location where your database files are stored
DB_DATA_LOCATION=/mnt/SAMSUNG/DB
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=****

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

1.Unzip the zip file and upload the video
2.Find the video in the webui and see no thumbnail and video playback.

Relevant log output

[Nest] 17  - 07/09/2024, 2:24:56 PM   DEBUG [Api:LoggingInterceptor~edm1skmb] POST /api/assets 201 360.71ms 192.168.1.1
[Nest] 17  - 07/09/2024, 2:24:56 PM VERBOSE [Api:LoggingInterceptor~edm1skmb] {"deviceAssetId":"web-00465.MTS-1294205648000","deviceId":"WEB","fileCreatedAt":"2011-01-05T05:34:08.000Z","fileModifiedAt":"2011-01-05T05:34:08.000Z","isFavorite":"false","duration":"0:00:00.000000"}
[Nest] 7  - 07/09/2024, 2:24:56 PM VERBOSE [Microservices:MetadataService] Exif Tags
[Nest] 7  - 07/09/2024, 2:24:56 PM VERBOSE [Microservices:MetadataService] Object:
{
  "SourceFile": "/usr/src/app/upload/upload/08bfaa34-c942-4721-91c9-f72b04c48d59/82/0e/820ec52a-cdbc-46bd-a5bc-29db17b64572.MTS",
  "errors": [],
  "tz": "UTC",
  "tzSource": "defaultVideosToUTC",
  "Duration": 9.36365333333333,
  "ExifToolVersion": 12.85,
  "FileName": "820ec52a-cdbc-46bd-a5bc-29db17b64572.MTS",
  "Directory": "/usr/src/app/upload/upload/08bfaa34-c942-4721-91c9-f72b04c48d59/82/0e",
  "FileSize": "14 MB",
  "FileModifyDate": {
    "_ctor": "ExifDateTime",
    "year": 2011,
    "month": 1,
    "day": 5,
    "hour": 0,
    "minute": 34,
    "second": 8,
    "tzoffsetMinutes": -300,
    "rawValue": "2011:01:05 00:34:08-05:00",
    "zoneName": "UTC-5",
    "inferredZone": false
  },
  "FileAccessDate": {
    "_ctor": "ExifDateTime",
    "year": 2024,
    "month": 7,
    "day": 9,
    "hour": 10,
    "minute": 24,
    "second": 56,
    "tzoffsetMinutes": -240,
    "rawValue": "2024:07:09 10:24:56-04:00",
    "zoneName": "UTC-4",
    "inferredZone": false
  },
  "FileInodeChangeDate": {
    "_ctor": "ExifDateTime",
    "year": 2024,
    "month": 7,
    "day": 9,
    "hour": 10,
    "minute": 24,
    "second": 56,
    "tzoffsetMinutes": -240,
    "rawValue": "2024:07:09 10:24:56-04:00",
    "zoneName": "UTC-4",
    "inferredZone": false
  },
  "FilePermissions": "-rw-r--r--",
  "FileType": "M2TS",
  "FileTypeExtension": "mts",
  "MIMEType": "video/m2ts",
  "VideoStreamType": "H.264 (AVC) Video",
  "AudioBitrate": "448 kbps",
  "SurroundMode": "Not indicated",
  "AudioChannels": "3/2",
  "AudioStreamType": "PGS Audio",
  "ImageWidth": 1440,
  "ImageHeight": 1080,
  "DateTimeOriginal": {
    "_ctor": "ExifDateTime",
    "year": 2011,
    "month": 1,
    "day": 5,
    "hour": 1,
    "minute": 33,
    "second": 58,
    "tzoffsetMinutes": 0,
    "rawValue": "2011:01:05 01:33:58+00:00",
    "zoneName": "UTC",
    "inferredZone": false
  },
  "ApertureSetting": "Auto",
  "Gain": "0 dB",
  "ExposureProgram": "Program AE",
  "WhiteBalance": "Auto",
  "Focus": "Auto (0.9)",
  "ImageStabilization": "On (0x3f)",
  "ExposureTime": "1/100",
  "FNumber": 3.4,
  "Make": "Sony",
  "Model": "HDR-PJ10E",
  "AudioSampleRate": 48000,
  "Aperture": 3.4,
  "ImageSize": "1440x1080",
  "Megapixels": 1.6,
  "ShutterSpeed": "1/100",
  "warnings": []
}

[Nest] 7  - 07/09/2024, 2:24:57 PM     LOG [Microservices:MediaService] Successfully generated JPEG video preview for asset b68276ff-f957-434a-beb6-0328c583463a
[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbhash): Error: Input file is missing: upload/thumbs/08bfaa34-c942-4721-91c9-f72b04c48d59/b6/82/b68276ff-f957-434a-beb6-0328c583463a-preview.jpeg
[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Error: Input file is missing: upload/thumbs/08bfaa34-c942-4721-91c9-f72b04c48d59/b6/82/b68276ff-f957-434a-beb6-0328c583463a-preview.jpeg
    at Sharp.toBuffer (/usr/src/app/node_modules/sharp/lib/output.js:161:17)
    at MediaRepository.generateThumbhash (/usr/src/app/dist/repositories/media.repository.js:137:14)
    at MediaService.handleGenerateThumbhash (/usr/src/app/dist/services/media.service.js:217:54)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /usr/src/app/dist/services/job.service.js:148:36
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Object:
{
  "id": "b68276ff-f957-434a-beb6-0328c583463a",
  "source": "upload"
}

[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: ENOENT: no such file or directory, open 'upload/thumbs/08bfaa34-c942-4721-91c9-f72b04c48d59/b6/82/b68276ff-f957-434a-beb6-0328c583463a-preview.jpeg'
[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Error: ENOENT: no such file or directory, open 'upload/thumbs/08bfaa34-c942-4721-91c9-f72b04c48d59/b6/82/b68276ff-f957-434a-beb6-0328c583463a-preview.jpeg'
    at async open (node:internal/fs/promises:636:25)
    at async readFile (node:internal/fs/promises:1246:14)
    at async MachineLearningRepository.getFormData (/usr/src/app/dist/repositories/machine-learning.repository.js:54:48)
    at async MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:17:26)
    at async MachineLearningRepository.encodeImage (/usr/src/app/dist/repositories/machine-learning.repository.js:42:26)
    at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/services/smart-info.service.js:91:27)
    at async /usr/src/app/dist/services/job.service.js:148:36
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Object:
{
  "id": "b68276ff-f957-434a-beb6-0328c583463a",
  "source": "upload"
}

[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Unable to run job handler (faceDetection/face-detection): Error: ENOENT: no such file or directory, open 'upload/thumbs/08bfaa34-c942-4721-91c9-f72b04c48d59/b6/82/b68276ff-f957-434a-beb6-0328c583463a-preview.jpeg'
[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Error: ENOENT: no such file or directory, open 'upload/thumbs/08bfaa34-c942-4721-91c9-f72b04c48d59/b6/82/b68276ff-f957-434a-beb6-0328c583463a-preview.jpeg'
    at async open (node:internal/fs/promises:636:25)
    at async readFile (node:internal/fs/promises:1246:14)
    at async MachineLearningRepository.getFormData (/usr/src/app/dist/repositories/machine-learning.repository.js:54:48)
    at async MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:17:26)
    at async MachineLearningRepository.detectFaces (/usr/src/app/dist/repositories/machine-learning.repository.js:33:26)
    at async PersonService.handleDetectFaces (/usr/src/app/dist/services/person.service.js:275:52)
    at async /usr/src/app/dist/services/job.service.js:148:36
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Object:
{
  "id": "b68276ff-f957-434a-beb6-0328c583463a",
  "source": "upload"
}

[Nest] 7  - 07/09/2024, 2:24:57 PM     LOG [Microservices:MediaService] Started encoding video b68276ff-f957-434a-beb6-0328c583463a {"inputOptions":[],"outputOptions":["-c:v copy","-c:a aac","-movflags faststart","-fps_mode passthrough","-map 0:0","-map 0:1","-v verbose","-cpu-used 5","-row-mt 1","-crf 23","-b:v 2300k"],"twoPass":false}
[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:MediaRepository] ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  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 @ 0x35116150180] parser not found for codec hdmv_pgs_subtitle, packets or times may be invalid.
    Last message repeated 1 times
[h264 @ 0x351161b0580] Reinit context to 1440x1088, pix_fmt: yuv420p
Input #0, mpegts, from 'upload/upload/08bfaa34-c942-4721-91c9-f72b04c48d59/82/0e/820ec52a-cdbc-46bd-a5bc-29db17b64572.MTS':
  Duration: 00:00:09.38, start: 1.040000, bitrate: 12078 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], 25 fps, 50 tbr, 90k tbn
  Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
  Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Correcting start time of Input #0 by 80000 us.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> webp (libwebp_anim))
Press [q] to stop, [?] for help
[h264 @ 0x351161b3180] Reinit context to 1440x1088, pix_fmt: yuv420p
[Parsed_thumbnail_1 @ 0x3511616d980] batch size: 12 frames
[Parsed_scale_5 @ 0x3511616d5c0] w:-2 h:250 flags:'lanczos+accurate_rnd+full_chroma_int' interl:0
[graph 0 input from stream 0:0 @ 0x3511616d380] w:1440 h:1080 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:4/3
[Parsed_fps_0 @ 0x3511616db00] fps=12/1
[Parsed_scale_5 @ 0x3511616d5c0] 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 @ 0x3511616db00] Set first pts to 6
Output #0, webp, to 'upload/thumbs/08bfaa34-c942-4721-91c9-f72b04c48d59/b6/82/b68276ff-f957-434a-beb6-0328c583463a-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 @ 0x35116180400] WebPAnimEncoderAssemble() failed with error: 1
[vost#0:0/libwebp_anim @ 0x35116151680] Error submitting video frame to the encoder
[Parsed_fps_0 @ 0x3511616db00] 2 frames in, 0 frames out; 2 frames dropped, 0 frames duplicated.
[out#0/webp @ 0x35116161680] All streams finished
[out#0/webp @ 0x35116161680] Terminating muxer thread
[AVIOContext @ 0x35116180680] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 0x351161802c0] Statistics: 20025488 bytes read, 2 seeks
Conversion failed!

[Nest] 7  - 07/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Unable to run job handler (thumbnailGeneration/generate-thumbnail): Error: ffmpeg exited with code 1: Conversion failed!

[Nest] 7  - 07/09/2024, 2:24:57 PM   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/09/2024, 2:24:57 PM   ERROR [Microservices:JobService] Object:
{
  "id": "b68276ff-f957-434a-beb6-0328c583463a",
  "source": "upload"
}

[Nest] 7  - 07/09/2024, 2:24:57 PM     LOG [Microservices:MediaService] Successfully encoded b68276ff-f957-434a-beb6-0328c583463a
[Nest] 17  - 07/09/2024, 2:25:02 PM     LOG [Api:EventRepository] Websocket Disconnect: -GBZ_DwIwOVUIW2ZAAER

Additional information

No response

@zuqini
Copy link

zuqini commented Jul 19, 2024

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"
}

@ne0ark
Copy link

ne0ark commented Aug 13, 2024

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!

@jmrplens
Copy link

Same problem.
Immich v1.112.1

Log
[Nest] 7  - 08/19/2024, 12:51:54 AM   ERROR [Microservices:JobService] Unable to run job handler (videoConversion/video-conversion): Error: ffprobe exited with code 1
ffprobe version 6.0.1-Jellyfin Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  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
/path/to/video.MTS: Invalid data found when processing input
[Nest] 7  - 08/19/2024, 12:51:54 AM   ERROR [Microservices:JobService] Error: ffprobe exited with code 1
ffprobe version 6.0.1-Jellyfin Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  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
/path/to/video.MTS: Invalid data found when processing input
    at ChildProcess.<anonymous> (/usr/src/app/node_modules/fluent-ffmpeg/lib/ffprobe.js:233:22)
    at ChildProcess.emit (node:events:519:28)

Possible solutions:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants