#Errors playing Transcoded videos after updating to 1.119

1 messages · Page 1 of 1 (latest)

prime crow
#

I have updated to 1.119 and now videos are not transcoding correctly. When played back they are just green, or stopped after about 1 second or proper playback with the frame frozen for remainder of the video duration. I can reproduce this playback error behavior on several browsers (chromium and firefox) and in the android app (1.118 as 119 is not yet available for me in the play store). I can also see it when I find the transcoded video file in my filesystem and attempt to play it locally outside of immich. Downloading the original video file of course works just fine. My nominal setup uses QSV with 2 pass encoding and hardware decoding as well since that was added. I have found the same issue whether I use QSV or CPU transcoding, and it also does not seem to matter what the input video resolution or format is, as I get the same errors regardless of what setting I use on my phone for test videos. All videos transcoded before today (installation of 1.119) work fine. Only since 119 is there a problem.

The setup is:
Server version: 1.119.1
App version 1.118.0 build.163
platform: Unraid
installation mode: docker compose manager for unraid
CPU: Intel i5-13500

magic bridgeBOT
#

:wave: Hey @prime crow,

Thanks for reaching out to us. Please follow the recommended actions below; this will help us be more effective in our support effort and leave more time for building Immich immich.

References

Checklist

  1. :ballot_box_with_check: I have verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: I have read applicable release notes.
  3. :ballot_box_with_check: I have reviewed the FAQs for known issues.
  4. :ballot_box_with_check: I have reviewed Github for known issues.
  5. :ballot_box_with_check: I have tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: I have uploaded the relevant logs, docker compose, and .env files, making sure to use code formatting.
  7. :ballot_box_with_check: I have 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)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

magic bridgeBOT
raw dew
#

What server version were you using before 1.119?

#

Also, could you share the ffprobe output for both the original and the transcode?

prime crow
prime crow
#

The ffprobe output for the transcoded file is:

#

The ffprobe output for the original is:

#

I get errors for any video I transcode right now. Not just this particular format

prime crow
raw dew
#

No worries! Could you also share the ffprobe output for an earlier working transcode?

prime crow
#

Sure, just need a few minutes. Actually... Is there an easy way to download the transcoded video? Because finding in the encoded videos directory... Jesus 😅

#

It is so difficult

raw dew
#

Oh is that how you’re doing it? You can just right click the video and download from the browser

prime crow
#

Yeah, but does that not download the original? At least for me it seems to download the original file, not the transcode 🤔

raw dew
#

Are you using the download button or right-clicking? The former will always download the original, but the latter will download the transcode if that’s what’s playing

prime crow
#

Ahhh. Okay I have been using the download button

#

Jesus right click is so much easier 😅😅😅

#

I feel unbelievably dumb for always searching though the encoded videos directory manually hahaha

raw dew
#

I admire your patience to navigate those folders lol

prime crow
#

I'm basically the Buddha

#

😂

#

okay a working transcoded video output is here:

raw dew
#

The metadata looks fine for both transcodes, so I think the issue happens during transcoding. The only transcoding change since 1.118.2 that could affect your settings is the removal of -strict unofficial from the transcoding command. I don’t get why removing it would cause this issue though

prime crow
#

hmm

#

out of curiosity, this is another failed transcoded video. this one ends up green. the other failed transcode is one where it freezes after about a second into the video

raw dew
#

You can try this:

  1. Set the log level to debug in the admin settings
  2. Click “refresh encoded video” for an affected video
  3. Go to the server logs and copy the FFmpeg command (only /usr/bin/ffmpeg onward)
  4. Run docker exec -it immich_server bash
  5. Enter the same FFmpeg command, but add -strict unofficial before the output file name
  6. Wait for it to finish
  7. Clear browser cache
  8. Open the video
prime crow
#

ffmpeg -n 10 /usr/bin/ffmpeg -i upload/library/ed6ac838-9447-41c2-8a6b-4e72f4de5a21/2024/2024-10-29/20241029_161007.mp4 -y -c:v vp9 -c:a copy -movflags faststart -fps_mode passthrough -map 0:0 -map 0:1 -v verbose -vf scale=-2:720,format=yuv420p -cpu-used 4 -row-mt 1 -crf 31 -b:v 0 upload/encoded-video/ed6ac838-9447-41c2-8a6b-4e72f4de5a21/53/19/53190b23-3e92-4418-925e-be7d3d8837ad.mp4

#

that command right?

raw dew
#

Yup

prime crow
#

the command errors

raw dew
#

Only run the /usr/bin/ffmpeg part onward

prime crow
#

ah okay

#

now it works

raw dew
#

Nice

prime crow
#

well

#

the command works

#

hold on

#

okay it looks like that fixed it

raw dew
#

Awesome! Now the question is… why

prime crow
#

ffprobe output for the now working video

shut pollen
#

Can you replicate the failure with the strict unofficial?

prime crow
shut pollen
#

Sorry can you *remove the addition of strict unofficial? And see if that makes a broken transcode again

prime crow
#

okay. I just tried it with another video, but using QSV this time. I didnt mention that the first time it was with cpu only

#

now I cannot reproduce the sucess

#

and I have a ton of errors in the encode log

#

a thousand of these

shut pollen
raw dew
#

com.android.capture.fps=30.000000 specifies fps as 30, but it seems this is ignored if -strict unofficial isn’t set
Without -strict unofficial:

r_frame_rate=120/1
avg_frame_rate=75720/2531

With -strict unofficial:

r_frame_rate=30/1
avg_frame_rate=30/1
raw dew
prime crow
raw dew
#

I wonder if this is related to #10560

magic bridgeBOT
prime crow
#

hmmm. I have not seen hang ever. At least not as it sounds like in that thread

prime crow
# prime crow

I should have specified. the transcode here did finish. just threw a bunch of that first. then proceeded and transcoded the file. no idea what was up with that

#

that was the end of the qsv transcode

#

🤷‍♂️

#

okay so I lied. apparently it was hanging when I read the errors 😅 but it didnt just sit there forever

raw dew
#

What’s the kernel version?

prime crow
raw dew
#

Output of sudo dmesg?

prime crow
#

umm. very long

#

but. I see a lot of gpu hang

#

that continues for many lines... until we get to eth info. running out of terminal though

#

but this doesnt fully explain why it was also happening with cpu transcoding no?

#

even if there are gpu issues 🤔

raw dew
#

I think these are two separate issues

magic bridgeBOT
raw dew
#

The GPU hang is a kernel issue though and you’d need to upgrade

prime crow
#

oof. unfortunately not much opportunity to do that with unraid. v7 is in beta and well... nobody should trust unraid version x.0 haha

#

luckily I have cpu to spare, so I can just fallback to cpu transcoding

raw dew
#

#13785 should help at least haha

magic bridgeBOT