#VP9 Hardware transcoding fails on 11900K Quicksync

1 messages · Page 1 of 1 (latest)

inner hatch
fading badgerBOT
#

:wave: Hey @inner hatch,

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

inner hatch
#

@small zealot

misty hare
inner hatch
#

@small zealot did you have to enable low power mode as you're on 9th gen?

small zealot
#

Okay so I had forgotten but my CPU doesn't support VP9 encode but decode only. Yours supports both.

inner hatch
inner hatch
small zealot
#

sudo cat /sys/kernel/debug/dri/0/gt/uc/guc_info
sudo cat /sys/kernel/debug/dri/0/gt/uc/huc_info

#

One at a time to check if it's enabled.

small zealot
#

I wasn't using VP9

#

I tried something.

#

It must've been VP8 or decoding VP9

inner hatch
#

Hopefully av1 encoding works much better than vp9

small zealot
#

Your CPU supports it though.

small zealot
#

And probably pretty slow.

inner hatch
small zealot
inner hatch
#

Yea, shame but at least it'll work when I upgrade my CPU one day. Dunno when that'll be cause my CPU already way more than enough. Put 64gb ram in my server and still never used more than 8gb at a time lol

small zealot
#

What server OS is immich on?

inner hatch
#

Unraid

small zealot
#

Okay, did you pass through your iGPU?

inner hatch
misty hare
#

Personally I don’t use hardware encoding because software is just better for quality and file size. If your server can handle it, setting it to av1 on cpu can still be valid.

small zealot
#
cd ~/
git clone --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
sudo mkdir -p /usr/lib/firmware
sudo cp -r linux-firmware/i915 /usr/lib/firmware
#

I would recommend you run those one at a time. (Applies to all of this.)

#
sudo mkdir -p /etc/modprobe.d
sudo sh -c "echo 'options i915 enable_guc=2' >> /etc/modprobe.d/i915.conf"
#
sudo update-initramfs -u && sudo update-grub
#

Reboot and then run this.

sudo dmesg | grep i915
#

Then these:
sudo cat /sys/kernel/debug/dri/0/gt/uc/guc_info
sudo cat /sys/kernel/debug/dri/0/gt/uc/huc_info

inner hatch
small zealot
#

Fair enough. But that doesn't mean VP9 doesn't work. It's just more complicated to set up.

inner hatch
inner hatch
small zealot
inner hatch
misty hare
#

My tip for av1 is that it’s optimized for high resolution, low bitrate. You can increase the target resolution and crank up crf higher than you’d think

inner hatch
#

I mean even with crf at 15 on the slowest setting, it encodes an h264 video in less than 2 seconds

small zealot
#

What speed profile is it set to?

#

CRF very low and speed profile above fast makes a big file quickly.

#

"a subjectively sane range is 17–28"

#

"Consider 17 or 18 to be visually lossless or nearly so; it should look the same or nearly the same as the input but it isn't technically lossless."

#

BUT, this is CRF

#

So this applies to software encoding.

#

Hardware encoding uses CQP

#

CRF changes QP to optimize for every frame.

#

CQP is a locked QP

small zealot
#

If you want fast with good quality then sure but you sacrifice a lot of storage.

inner hatch
#

Higher quality file, that takes longer so it counteracts the larger file result

inner hatch
#

I never changed the cqp

misty hare
#

It uses the same value for cqp

small zealot
#

Immich uses the same for both.

small zealot
inner hatch
#

I see I can change it to ICQ though

small zealot
#

How long is the video that took 2 seconds

small zealot
inner hatch
small zealot
#

But it's better than CQP

inner hatch
#

So does it use the crf value I set or not? Lol

small zealot
misty hare
#

I think 18 is the lowest that makes sense. Keep in mind that below a certain point, the crf isn’t just about quality but accuracy. A crf of 1 will waste time replicating the exact noise and artifacts in the source and blow up the file size to accomplish that.

inner hatch
misty hare
#

Yes, although QSV uses ICQ by default as it is

small zealot
small zealot
#

Even when set to CQP in immich?

misty hare
#

If it’s set to CQP it will use cqp, but on “auto” it only uses it for vp9 on qsv

#

It was added as an escape hatch for older cpu’s that didn’t support icq

small zealot
#

CQP is Constant QP or Constant Quantization Parameter

inner hatch
#

I wish there was a slower preset then veryslow cause it already blazes through that and I'd be fine letting it take an extra .5 seconds for a smaller file at the same quality

small zealot
#

CRF is Constant Rate Factor. So it changes the QP while running.

small zealot
#

That might half the filesize.

#

Might

inner hatch
#

Where can you change the QP? Only see the crf and that's 18 now

small zealot
#

Crf/cqp/qp

small zealot
misty hare
#

Maybe we should rename that setting

small zealot
#

Yes please

inner hatch
#

Oh then I don't wait to raise that to lower the file size, gotta have the best quality I can do

small zealot
#

You know this is just for the preview. The original file is still saved.

misty hare
#

You can also increase b frames to get better compression

small zealot
#

To see the filesize difference

small zealot
#

So I'd give 20 a try

misty hare
#

I forget if we use lookahead for qsv. That’d be another good one to have if not

small zealot
#

That is what the option is called I think.

#

Like in ffmpeg.

#

Idk about immich

misty hare
#

Yeah we don’t use that. I think I tried that mode, but it didn’t work on my cpu.

inner hatch
small zealot
#

...

#

Huh?

#

The web loads from the server.

inner hatch
#

We're talking about the setting that let's you choose between originals and previews right?

#

I set it to originals on the web version and previews on the mobile version

small zealot
#

Oh you said originals on web. And then separately previews on mobile for bad internet.

#

I though you set originals on web for bad internet lol, that wouldn't make sense.

inner hatch
#

No lol

#

I always have good wifi

misty hare
#

Raptor Lake, 13700H

small zealot
#

Bleeding edge so that's probably why.

small zealot
misty hare
#

Yeah it could be a software issue, I didn’t look too deep into it.

small zealot
misty hare
#

I (probably mistakenly) figured that if it didn’t work on this cpu it probably wouldn’t on older gens either

small zealot
#

Lol

#

If someone will PR it I might be able to test it?

#

Though it'll be a pain for me.

#

Because I'd HAVE to test it on TrueNAS Scale because that's my only Intel CPU

#

So I'd have to set up docker in a "jail" or custom app from a repo

inner hatch
misty hare
small zealot
inner hatch
# small zealot Huh

I think unraid forums warn people not to upgrade to 13th gen cause they won't support it till the next major update, so I can't use his CPU yet

#

Love unraid, but they're slow to gain support of the newest hardware

small zealot
#

Probably they will update the kernel version only on the next major release.

#

Which is a common practice. Don't change kernel version until major release unless security issue.

inner hatch
small zealot
#

TrueNAS Scale does about one major release per year.

#

Both are server OSes, what do you expect. It's about stability, not bleeding edge.

inner hatch
#

Looks like they released in June of last year, so they still got time to beat truenas

inner hatch