stuttering encoded video using quicksync, h264 codec
some videos when encoded using the intel igpu will end up with a stutter.
for reference https://github.com/immich-app/immich/issues/8657
hardware info
compose
OS: Linux Mint 22 x86_64
Kernel: 6.8.0-49-generic
Uptime: 21 days, 4 hours, 40 mins
Packages: 2209 (dpkg), 25 (flatpak)
Shell: bash 5.2.21
CPU: 11th Gen Intel i7-11700K (16) @ 4.900GHz
GPU: AMD ATI Radeon RX 6650 XT / 6700S / 6800S
GPU: Intel RocketLake-S GT1 [UHD Graphics 750]
Memory: 45548MiB / 64066MiB
OS: Linux Mint 22 x86_64
Kernel: 6.8.0-49-generic
Uptime: 21 days, 4 hours, 40 mins
Packages: 2209 (dpkg), 25 (flatpak)
Shell: bash 5.2.21
CPU: 11th Gen Intel i7-11700K (16) @ 4.900GHz
GPU: AMD ATI Radeon RX 6650 XT / 6700S / 6800S
GPU: Intel RocketLake-S GT1 [UHD Graphics 750]
Memory: 45548MiB / 64066MiB
#
# 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: quicksync # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
- ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${BACKUP_LOCATION}:/usr/src/app/upload/backups
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- 2283
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false
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}-openvino
extends:
# uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
file: hwaccel.ml.yml
service: openvino # 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
healthcheck:
disable: false
redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
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}
POSTGRES_INITDB_ARGS: --data-checksums
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
healthcheck:
test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' ||
exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}'
--username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT
COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo
"checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
interval: 5m
start_interval: 30s
start_period: 5m
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: null
networks:
default:
name: ARRRR
external: true
#
# 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: quicksync # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
- ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${BACKUP_LOCATION}:/usr/src/app/upload/backups
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- 2283
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false
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}-openvino
extends:
# uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
file: hwaccel.ml.yml
service: openvino # 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
healthcheck:
disable: false
redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
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}
POSTGRES_INITDB_ARGS: --data-checksums
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
healthcheck:
test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' ||
exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}'
--username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT
COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo
"checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
interval: 5m
start_interval: 30s
start_period: 5m
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: null
networks:
default:
name: ARRRR
external: true
3 Replies
:wave: Hey @icedragon2002002,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed..env
debug logs collected while encoding the video.
# 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=/home/redacted/data/immich/
THUMB_LOCATION=/home/redacted/immich/thumbs
ENCODED_VIDEO_LOCATION=/home/redacted/immich/encoded-video
PROFILE_LOCATION=/home/redacted/data/immich/profile
BACKUP_LOCATION=/home/redacted/data/immich/backups
# The location where your database files are stored
DB_DATA_LOCATION=/home/redacted/immich/database
# 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=America/Chicago
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=v1.122.2
# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=redacted
# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=redacted
DB_DATABASE_NAME=redacted
# 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=/home/redacted/data/immich/
THUMB_LOCATION=/home/redacted/immich/thumbs
ENCODED_VIDEO_LOCATION=/home/redacted/immich/encoded-video
PROFILE_LOCATION=/home/redacted/data/immich/profile
BACKUP_LOCATION=/home/redacted/data/immich/backups
# The location where your database files are stored
DB_DATA_LOCATION=/home/redacted/immich/database
# 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=America/Chicago
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=v1.122.2
# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=redacted
# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=redacted
DB_DATABASE_NAME=redacted
croservices:MediaService] Transcoding video 6c362900-c0cf-41cf-af53-0fb834e79344 with QSV-accelerated encoding and decoding
immich_server | [Nest] 7 - 12/11/2024, 3:47:55 PM DEBUG [Microservices:MediaRepository] ffmpeg -n 10 /usr/bin/ffmpeg -hwaccel qsv -hwaccel_output_format qsv -async_depth 4 -noautorotate -qsv_device /dev/dri/card1 -threads 1 -i upload/library/admin/2021/20210411_214304.mp4 -y -c:v h264_qsv -c:a aac -movflags faststart -fps_mode passthrough -map 0:0 -map 0:1 -bf 7 -refs 5 -g 256 -v verbose -vf scale_qsv=720:-1:async_depth=4:mode=hq:format=nv12 -preset 1 -global_quality:v 28 -maxrate 4500k -bufsize 9000k upload/encoded-video/2fd86add-6ea2-4f52-8931-c99015eafbec/6c/36/6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:56 PM DEBUG [Microservices:MediaRepository] Transcoding 6.87% done for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:56 PM DEBUG [Microservices:MediaRepository] Transcoding 15.38% done, estimated 5s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:57 PM DEBUG [Microservices:MediaRepository] Transcoding 24.06% done, estimated 4s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:57 PM DEBUG [Microservices:MediaRepository] Transcoding 32.89% done, estimated 4s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:58 PM DEBUG [Microservices:MediaRepository] Transcoding 41.40% done, estimated 3s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:58 PM DEBUG [Microservices:MediaRepository] Transcoding 49.94% done, estimated 3s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:59 PM DEBUG [Microservices:MediaRepository] Transcoding 58.30% done, estimated 2s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:59 PM DEBUG [Microservices:MediaRepository] Transcoding 66.43% done, estimated 2s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:48:00 PM DEBUG [Microservices:MediaRepository] Transcoding 74.65% done, estimated 1s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:48:00 PM DEBUG [Microservices:MediaRepository] Transcoding 82.86% done, estimated 1s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:48:01 PM DEBUG [Microservices:MediaRepository] Transcoding 91.43% done for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 17 - 12/11/2024, 3:48:01 PM DEBUG [Api:LoggingInterceptor~ghbky27t] GET /api/server/ping 200 0.13ms ::ffff:127.0.0.1
immich_server | [Nest] 7 - 12/11/2024, 3:48:01 PM DEBUG [Microservices:MediaRepository] Transcoding 99.59% done for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:48:01 PM LOG [Microservices:MediaService] Successfully encoded 6c362900-c0cf-41cf-af53-0fb834e79344
croservices:MediaService] Transcoding video 6c362900-c0cf-41cf-af53-0fb834e79344 with QSV-accelerated encoding and decoding
immich_server | [Nest] 7 - 12/11/2024, 3:47:55 PM DEBUG [Microservices:MediaRepository] ffmpeg -n 10 /usr/bin/ffmpeg -hwaccel qsv -hwaccel_output_format qsv -async_depth 4 -noautorotate -qsv_device /dev/dri/card1 -threads 1 -i upload/library/admin/2021/20210411_214304.mp4 -y -c:v h264_qsv -c:a aac -movflags faststart -fps_mode passthrough -map 0:0 -map 0:1 -bf 7 -refs 5 -g 256 -v verbose -vf scale_qsv=720:-1:async_depth=4:mode=hq:format=nv12 -preset 1 -global_quality:v 28 -maxrate 4500k -bufsize 9000k upload/encoded-video/2fd86add-6ea2-4f52-8931-c99015eafbec/6c/36/6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:56 PM DEBUG [Microservices:MediaRepository] Transcoding 6.87% done for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:56 PM DEBUG [Microservices:MediaRepository] Transcoding 15.38% done, estimated 5s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:57 PM DEBUG [Microservices:MediaRepository] Transcoding 24.06% done, estimated 4s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:57 PM DEBUG [Microservices:MediaRepository] Transcoding 32.89% done, estimated 4s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:58 PM DEBUG [Microservices:MediaRepository] Transcoding 41.40% done, estimated 3s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:58 PM DEBUG [Microservices:MediaRepository] Transcoding 49.94% done, estimated 3s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:59 PM DEBUG [Microservices:MediaRepository] Transcoding 58.30% done, estimated 2s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:47:59 PM DEBUG [Microservices:MediaRepository] Transcoding 66.43% done, estimated 2s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:48:00 PM DEBUG [Microservices:MediaRepository] Transcoding 74.65% done, estimated 1s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:48:00 PM DEBUG [Microservices:MediaRepository] Transcoding 82.86% done, estimated 1s remaining for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:48:01 PM DEBUG [Microservices:MediaRepository] Transcoding 91.43% done for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 17 - 12/11/2024, 3:48:01 PM DEBUG [Api:LoggingInterceptor~ghbky27t] GET /api/server/ping 200 0.13ms ::ffff:127.0.0.1
immich_server | [Nest] 7 - 12/11/2024, 3:48:01 PM DEBUG [Microservices:MediaRepository] Transcoding 99.59% done for output 6c362900-c0cf-41cf-af53-0fb834e79344.mp4
immich_server | [Nest] 7 - 12/11/2024, 3:48:01 PM LOG [Microservices:MediaService] Successfully encoded 6c362900-c0cf-41cf-af53-0fb834e79344
Successfully submitted, a tag has been added to inform contributors. :white_check_mark: