I
Immich•5mo ago
flywalt

cannot encode videos

hi there's some issue with my video services. I found : 1. the microservices log keeps report"ERROR [Microservices:MediaService] mov,mp4,m4a,3gp,3g2,mj2", 2. and the encode task won't proceed. 3. at first the exteral library scaned like 14000 video files, but later the count droped to 4000, while the encode task count is still 14000 and won't go foward. What I've done is to use the hardware accelerate as the docs described. My host CPU is n5015 which is the 11th type of intel and capable of qsv.
22 Replies
Immich
Immich•5mo ago
:wave: Hey @flywalt, 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. Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Mraedis
Mraedis•5mo ago
What kind of setup is this? There is no separate microservices container anymore since quite a while
flywalt
flywaltOP•5mo ago
I Just did so by following this instruction https://immich.app/docs/administration/jobs-workers
Mraedis
Mraedis•5mo ago
Is this a fresh install? If so, why are you following the advanced configuration instructions and not the basic install first?
flywalt
flywaltOP•5mo ago
well to be honest, this is my like 10th install or so. In my last install it worked well seperately but still slowly. So I tried to use the hardware acceleration and came across this issue.
Mraedis
Mraedis•5mo ago
Considering you have a pretty normal install from what i cna tell I suggest you just use the default compose
flywalt
flywaltOP•5mo ago
may I ask if I use the default compose and do compose up, is the current data and library still with me or I must built a brand new setup?
Mraedis
Mraedis•5mo ago
You need to include your external library /mnt/DS920/photos:/mnt/media/Photos:ro of course but as long as you use the same folder values for the DB and Upload locations, it should be drop-in replacement
flywalt
flywaltOP•5mo ago
yes, I noticed that there is a unique ID route in thumbs and encoded-video, which changes every time I do a new setup. So I was wondering whether if I just change the compose.yml the assets are still available. good to know they are!
Mraedis
Mraedis•5mo ago
They will be if those locations are kept intact yes
flywalt
flywaltOP•5mo ago
I tried the default setup, it is still unable to encode using QSV. maybe it's because I run it in a ESXI virtural environment?
Mraedis
Mraedis•5mo ago
If you're trying to do QSV on a VM you need to pass through your integrated GPU first I don't know how to do that on ESXi but google says it should be:
Enable passthrough of the iGPU under the ESXi Configure->Hardware->PCI Devices settings and then add a new PCI Device to the VM and select the iGPU. You can use either DirectPath IO or Dynamic DirectPath IO, it does not make a difference.
Best do your own research for that though 😛 You can look for Jellyfin related issues here, Immich uses jellyfin ffmpeg and setups can be very similar
flywalt
flywaltOP•5mo ago
thx I will try that later I rebuild the setup with default compose,but there is still error logs: [Nest] 8 - 12/03/2024, 9:21:13 AM ERROR [Microservices:JobService] Unable to run job handler (faceDetection/face-detection): Error: Machine learning request to "http://immich-machine-learning:3003" failed with HeadersTimeoutError: Headers Timeout Error [Nest] 8 - 12/03/2024, 9:21:13 AM ERROR [Microservices:JobService] Error: Machine learning request to "http://immich-machine-learning:3003" failed with HeadersTimeoutError: Headers Timeout Error at /usr/src/app/dist/repositories/machine-learning.repository.js:18:19 at async MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:17:21) at async MachineLearningRepository.detectFaces (/usr/src/app/dist/repositories/machine-learning.repository.js:32:26) at async PersonService.handleDetectFaces (/usr/src/app/dist/services/person.service.js:226:52) at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:151:28) at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:122:13) 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] 8 - 12/03/2024, 9:21:13 AM ERROR [Microservices:JobService] Object: { "id": "0890fef1-0919-45bf-beb0-75bed6f16916" } [Nest] 8 - 12/03/2024, 9:22:20 AM ERROR [Microservices:MediaService] mov,mp4,m4a,3gp,3g2,mj2 [Nest] 8 - 12/03/2024, 9:22:31 AM ERROR [Microservices:MediaService] mov,mp4,m4a,3gp,3g2,mj2 sometimes the connection to machinelearning is invalid, which I suppose is due to the high usage of CPU? AND there is continous reports like [Microservices:MediaService] mov,mp4,m4a,3gp,3g2,mj2
Mraedis
Mraedis•5mo ago
It could also be that some files are corrupted, is the "id": "0890fef1-0919-45bf-beb0-75bed6f16916" always the same ID or does it vary?
flywalt
flywaltOP•5mo ago
it varies from time to time
Mraedis
Mraedis•5mo ago
ANything special about those assets? They would be accessible with for instance https://my.immich.app/photos/0890fef1-0919-45bf-beb0-75bed6f16916
flywalt
flywaltOP•5mo ago
I found an issue on github https://github.com/immich-app/immich/issues/10343 with a same problem, but I'm running on docker-compose instead of podman. Someone said it may occur if the CPU usage is too high but I don't find a related issue.
Mraedis
Mraedis•5mo ago
Special may be that the asset is a huge or long video Best compare a few of them and see if anything catches your eye, like phone/recording device type, size ... Then we can better try and figure out how to fix it 🙂
flywalt
flywaltOP•5mo ago
Well I may check that later! Besides with the second problem(continous reports like [Microservices:MediaService] mov,mp4,m4a,3gp,3g2,mj2), do you have any idea where the problem lies? What I see is the encode task won't proceed, but the log is too short to indentify the problem specifically I checked for 3 assests finding them nothing special with size less than 5mb and pics instead of videos.
Mraedis
Mraedis•5mo ago
Alright so you're using the default compose, but added the QSV option right? And you've enabled HWA in your settings?
flywalt
flywaltOP•5mo ago
yes, I select qsv in HWA but not select the hardware decode any more suggestions?
flywalt
flywaltOP•5mo ago
now the previous problem disappeard but the transcode still has error reports like

Did you find this page helpful?