[BUG] TRANSCODE VIDEOS operation fails using the opus codec #1331

Closed
opened 2026-02-20 00:06:37 -05:00 by deekerman · 0 comments
Owner

Originally created by @lsfoschine on GitHub (Sep 14, 2023).

The bug

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-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --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
[h264 @ 0x280da300980] Reinit context to 1088x1440, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'upload/library/admin/2023/2023-09-06/VID_20230905_220915.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2023-09-06T01:09:23.000000Z
com.android.version: 13
com.android.manufacturer: Xiaomi
com.android.model: 2201123G
Duration: 00:00:07.11, start: 0.000000, bitrate: 7051 kb/s
Stream #0:00x1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 64 kb/s (default)
Metadata:
creation_time : 2023-09-06T01:09:23.000000Z
handler_name : SoundHandle
vendor_id : [0][0][0][0]
Stream #0:10x2: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m, progressive, left), 1080x1440 (1088x1440), 6319 kb/s, 30.26 fps, 25 tbr, 90k tbn (default)
Metadata:
creation_time : 2023-09-06T01:09:23.000000Z
handler_name : VideoHandle
vendor_id : [0][0][0][0]
Side data:
displaymatrix: rotation of 90.00 degrees
[vost#0:0 @ 0x280da1c3480] Matched encoder 'libvpx-vp9' for codec 'vp9'.
Stream mapping:
Stream #0:1 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))
Stream #0:0 -> #0:1 (aac (native) -> opus (native))
Press [q] to stop, [?] for help
[h264 @ 0x280da303980] Reinit context to 1088x1440, pix_fmt: yuv420p
[graph 0 input from stream 0:1 @ 0x280da0c1080] w:1080 h:1440 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:0/1
[transpose @ 0x280da1315c0] w:1080 h:1440 dir:2 -> w:1440 h:1080 rotation:counterclockwise vflip:0
[libvpx-vp9 @ 0x280da301180] v1.12.0
[libvpx-vp9 @ 0x280da301180] --prefix=/usr --enable-pic --enable-shared --disable-install-bins --disable-install-srcs --size-limit=16384x16384 --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --enable-vp9-highbitdepth --target=x86_64-linux-gcc
[libvpx-vp9 @ 0x280da301180] Neither bitrate nor constrained quality specified, using default CRF of 32
[graph_1_in_0_0 @ 0x280da1366c0] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:mono
[format_out_0_1 @ 0x280da136840] auto-inserting filter 'auto_aresample_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_aresample_0 @ 0x280da136900] ch:1 chl:mono fmt:fltp r:44100Hz -> ch:1 chl:mono fmt:fltp r:48000Hz

[opus @ 0x280da302980] The encoder 'opus' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
[opus @ 0x280da302980] Alternatively use the non experimental encoder 'libopus'.
Terminating demuxer thread 0

[AVIOContext @ 0x280da260180] Statistics: 1051488 bytes read, 3 seeks
Conversion failed!

ERROR [JobService] Unable to run job handler: Error: ffmpeg exited with code 1: Conversion failed!

ERROR [JobService] Error: ffmpeg exited with code 1: Conversion failed!

at ChildProcess.<anonymous> (/usr/src/app/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
at ChildProcess.emit (node:events:514:28)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)

The OS that Immich Server is running on

Kali 2023.3 (Docker 24.0.5)

Version of Immich Server

v1.78.1

Version of Immich Mobile App

v1.77.0 build.100

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ["start-server.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: "no"

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ["start-microservices.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: "no"

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    deploy:
      resources:
        limits:
          memory: 4GB
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - ${MODELCACHE_LOCATION}:/cache
    env_file:
      - .env
    restart: "no"

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    restart: "no"

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.0
    env_file:
      - .env
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    logging:
      driver: none
    volumes:
      - ${TSDATA_LOCATION}:/data
    restart: "no"

  redis:
    container_name: immich_redis
    image: redis:6.2
    env_file:
      - .env
    volumes:
      - ${REDIS_LOCATION}:/data
    restart: "no"

  database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - ${PGDATA_LOCATION}:/var/lib/postgresql/data
    restart: "no"

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
    restart: "no"

Your .env content

DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_PASSWORD=******
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis
REDIS_URL=ioredis://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
UPLOAD_LOCATION=/tank/immich-app-upload_location
MODELCACHE_LOCATION=/tank/immich-app-model-cache
PGDATA_LOCATION=/tank/immich-app-pgdata
TSDATA_LOCATION=/tank/immich-app-tsdata
REDIS_LOCATION=/tank/immich-app-redis
TYPESENSE_API_KEY=***********
TYPESENSE_URL=ha://XXXXXXXXXXXXXXXXXXXXXXXXXX
DISABLE_REVERSE_GEOCODING=false
REVERSE_GEOCODING_PRECISION=3
IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

Reproduction steps

1.Record videos on mobile
2.Backup from mobile to server
3.Click "missing" on Jobs > TRANSCODE VIDEOS

Additional information

image

Originally created by @lsfoschine on GitHub (Sep 14, 2023). ### The bug ### ERROR [MediaRepository] ffmpeg version 6.0-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-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --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 [h264 @ 0x280da300980] Reinit context to 1088x1440, pix_fmt: yuv420p Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'upload/library/admin/2023/2023-09-06/VID_20230905_220915.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2023-09-06T01:09:23.000000Z com.android.version: 13 com.android.manufacturer: Xiaomi com.android.model: 2201123G Duration: 00:00:07.11, start: 0.000000, bitrate: 7051 kb/s Stream #0:0[0x1](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 64 kb/s (default) Metadata: creation_time : 2023-09-06T01:09:23.000000Z handler_name : SoundHandle vendor_id : [0][0][0][0] Stream #0:1[0x2](eng): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m, progressive, left), 1080x1440 (1088x1440), 6319 kb/s, 30.26 fps, 25 tbr, 90k tbn (default) Metadata: creation_time : 2023-09-06T01:09:23.000000Z handler_name : VideoHandle vendor_id : [0][0][0][0] Side data: displaymatrix: rotation of 90.00 degrees [vost#0:0 @ 0x280da1c3480] Matched encoder 'libvpx-vp9' for codec 'vp9'. Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9)) Stream #0:0 -> #0:1 (aac (native) -> opus (native)) Press [q] to stop, [?] for help [h264 @ 0x280da303980] Reinit context to 1088x1440, pix_fmt: yuv420p [graph 0 input from stream 0:1 @ 0x280da0c1080] w:1080 h:1440 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:0/1 [transpose @ 0x280da1315c0] w:1080 h:1440 dir:2 -> w:1440 h:1080 rotation:counterclockwise vflip:0 [libvpx-vp9 @ 0x280da301180] v1.12.0 [libvpx-vp9 @ 0x280da301180] --prefix=/usr --enable-pic --enable-shared --disable-install-bins --disable-install-srcs --size-limit=16384x16384 --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --enable-vp9-highbitdepth --target=x86_64-linux-gcc [libvpx-vp9 @ 0x280da301180] Neither bitrate nor constrained quality specified, using default CRF of 32 [graph_1_in_0_0 @ 0x280da1366c0] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:mono [format_out_0_1 @ 0x280da136840] auto-inserting filter 'auto_aresample_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1' [auto_aresample_0 @ 0x280da136900] ch:1 chl:mono fmt:fltp r:44100Hz -> ch:1 chl:mono fmt:fltp r:48000Hz > [opus @ 0x280da302980] The encoder 'opus' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it. > [opus @ 0x280da302980] Alternatively use the non experimental encoder 'libopus'. > Terminating demuxer thread 0 [AVIOContext @ 0x280da260180] Statistics: 1051488 bytes read, 3 seeks Conversion failed! ### ERROR [JobService] Unable to run job handler: Error: ffmpeg exited with code 1: Conversion failed! ### ERROR [JobService] Error: ffmpeg exited with code 1: Conversion failed! at ChildProcess.<anonymous> (/usr/src/app/node_modules/fluent-ffmpeg/lib/processor.js:182:22) at ChildProcess.emit (node:events:514:28) at ChildProcess._handle.onexit (node:internal/child_process:291:12) ### The OS that Immich Server is running on Kali 2023.3 (Docker 24.0.5) ### Version of Immich Server v1.78.1 ### Version of Immich Mobile App v1.77.0 build.100 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: ["start-server.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env depends_on: - redis - database - typesense restart: "no" immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: ["start-microservices.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env depends_on: - redis - database - typesense restart: "no" immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} deploy: resources: limits: memory: 4GB volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - ${MODELCACHE_LOCATION}:/cache env_file: - .env restart: "no" immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - .env restart: "no" typesense: container_name: immich_typesense image: typesense/typesense:0.24.0 env_file: - .env environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data logging: driver: none volumes: - ${TSDATA_LOCATION}:/data restart: "no" redis: container_name: immich_redis image: redis:6.2 env_file: - .env volumes: - ${REDIS_LOCATION}:/data restart: "no" database: container_name: immich_postgres image: postgres:14 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: - ${PGDATA_LOCATION}:/var/lib/postgresql/data restart: "no" immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-server restart: "no" ``` ### Your .env content ```Shell DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_PASSWORD=****** DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis REDIS_URL=ioredis://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX UPLOAD_LOCATION=/tank/immich-app-upload_location MODELCACHE_LOCATION=/tank/immich-app-model-cache PGDATA_LOCATION=/tank/immich-app-pgdata TSDATA_LOCATION=/tank/immich-app-tsdata REDIS_LOCATION=/tank/immich-app-redis TYPESENSE_API_KEY=*********** TYPESENSE_URL=ha://XXXXXXXXXXXXXXXXXXXXXXXXXX DISABLE_REVERSE_GEOCODING=false REVERSE_GEOCODING_PRECISION=3 IMMICH_WEB_URL=http://immich-web:3000 IMMICH_SERVER_URL=http://immich-server:3001 IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 ``` ### Reproduction steps ```bash 1.Record videos on mobile 2.Backup from mobile to server 3.Click "missing" on Jobs > TRANSCODE VIDEOS ``` ### Additional information ![image](https://github.com/immich-app/immich/assets/47157254/9176a671-1a7b-4ed3-a62c-514b29c3fa05)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#1331
No description provided.