What does video transcoding actually do?

I'm re-encoding all videos in my immich library, after clearing all assets.encodedVideoPath values in the db and deleting the encoded-video dir. A few questions: 1. The job queue shows ~187k jobs waiting but I only have 8k videos on my server. Is immich adding all assets (including photos) to the transcode queue? 2. immich-microservices logs contain many entries like this:
[MediaService] Start encoding video 5c800eac-fcd3-43be-aca0-28d2e04e5617 { ... }
[MediaService] Encoding success 8a78614d-d8b7-4612-aec7-73a1729f2786
[MediaService] Start encoding video 0a51047e-ceff-4f78-8e39-cef5ab75e821 { ... }
[MediaService] Encoding success 6cfd60cc-44af-47dd-8883-c9cbf4030dab
[MediaService] Start encoding video 5c800eac-fcd3-43be-aca0-28d2e04e5617 { ... }
[MediaService] Encoding success 8a78614d-d8b7-4612-aec7-73a1729f2786
[MediaService] Start encoding video 0a51047e-ceff-4f78-8e39-cef5ab75e821 { ... }
[MediaService] Encoding success 6cfd60cc-44af-47dd-8883-c9cbf4030dab
but the "start encoding" and "encoding success" IDs never seem to match one another. Is this expected? 3. The number of files in $IMMICH_DATA/encoded-video grows very slowly, much slower than the "encoding success" logs. At the same time, my CPU is essentially saturated by transcoding, with apparently no output to show for it. What could explain this? Also check the attached screenshot, it shows available storage over the past 24h during continuous transcoding. It has become pretty much flat for the past few hours.
No description
1 Reply
sogan
sogan2y ago
1. Videos and the video portion of live photos are added to the queue 2. This is normal if the job concurrency for transcoding is greater than 1 3. This seems to suggest that it’s overwriting existing transcodes. Definitely not normal given you deleted the folder before starting the job Depending on how many live photos you have, the queue being 187k may or may not be normal. But between the low video count in encoded-video and the flattened storage use, something seems wrong. I wonder if it might be overwriting existing transcodes. Could you mention roughly how many live photos you have (if any)? If the transcoding concurrency is greater than 1, does the same behavior occur when it’s set to 1? Could you also check the creation/modification dates for the files in encoded-videos? If they aren’t being overwritten, then almost all of them should be prior to the time when the storage use flattened.

Did you find this page helpful?