#VP9 Hardware transcoding fails on 11900K Quicksync
1 messages · Page 1 of 1 (latest)
: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
.
References
- Container Logs:
docker compose logsdocs - Container Status:
docker compose psdocs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
Checklist
- :blue_square: I have verified I'm on the latest release(note that mobile app releases may take some time).
- :blue_square: I have read applicable release notes.
- :blue_square: I have reviewed the FAQs for known issues.
- :blue_square: I have reviewed Github for known issues.
- :blue_square: I have tried accessing Immich via local ip (without a custom reverse proxy).
- :blue_square: I have uploaded the relevant logs, docker compose, and .env files using the buttons below or the
/uploadcommand. - :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.
@small zealot
There are some quirks to VP9 on Quick Sync: https://immich.app/docs/features/hardware-transcoding#qsv
My kernel is newer than the requirement, so I have to enable low-power mode? Will that mess up the rest of my server?
@small zealot did you have to enable low power mode as you're on 9th gen?
Okay so I had forgotten but my CPU doesn't support VP9 encode but decode only. Yours supports both.
Intel Quick Sync Video is Intel's brand for its dedicated video encoding and decoding hardware core. Quick Sync was introduced with the Sandy Bridge CPU microarchitecture on 9 January 2011 and has been found on the die of Intel CPUs ever since.
The name "Quick Sync" refers to the use case of quickly transcoding ("converting") a video from, for e...
Idek how to follow those jellyfin instructions cause it gives steps for 3 different Linux distributions, but unraid uses Slackware which isn't mentioned 🤔
How have you been hardware encoding it then lol
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.
I forgot.
I wasn't using VP9
I tried something.
It must've been VP8 or decoding VP9
Oh god lmao time to change back to h264 haha
Hopefully av1 encoding works much better than vp9
Your CPU supports it though.
That'll be CPU
And probably pretty slow.
Yet it still doesn't work 🤷🏻♂️
No hardware encoding (QSV in your case) on your CPU for AV1
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
What server OS is immich on?
Unraid
Okay, did you pass through your iGPU?
Heh
Yea I use it for h264 no prob
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.
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
Valid
As much as I appreciate you helping me and giving me all that info, I'm too afraid to mess with my kernel stuff lol. I'd rather just stick to what I have now, it's working well enough
Fair enough. But that doesn't mean VP9 doesn't work. It's just more complicated to set up.
As long as software av1 encoding isn't too slow, sounds like a viable option to try
Yea but if av1 is right around the corner, I might as well put my effort into getting that to work
Should just be setting it to AV1.
That's the dream lol
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
I like to make my crf super low lol
I mean even with crf at 15 on the slowest setting, it encodes an h264 video in less than 2 seconds
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
But on a hardware encoder you still shouldn't do this in most cases.
If you want fast with good quality then sure but you sacrifice a lot of storage.
crf 15, preset veryslow
Higher quality file, that takes longer so it counteracts the larger file result
Ohhhh I never changed that. That explains why it's so quick
I never changed the cqp
It uses the same value for cqp
It's just that the value functions differently when you have hardware vs software, that was my point.
I see I can change it to ICQ though
How long is the video that took 2 seconds
ICQ is closer to CRF
20 seconds I think
So does it use the crf value I set or not? Lol
Intel exclusive.
Yes
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.
So it's best to use crf 18 and ICQ?
Yes, although QSV uses ICQ by default as it is
Would recommend it over what you have now.
Really?
Even when set to CQP in immich?
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
QP is Quantization Parameter
CQP is Constant QP or Constant Quantization Parameter
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
CRF is Constant Rate Factor. So it changes the QP while running.
Set your QP to like 20
That might half the filesize.
Might
Where can you change the QP? Only see the crf and that's 18 now
Crf/cqp/qp
Within immich they're the same thing.
Maybe we should rename that setting
Yes please
Oh then I don't wait to raise that to lower the file size, gotta have the best quality I can do
You know this is just for the preview. The original file is still saved.
You can also increase b frames to get better compression
Also, he might not have rerun the job
To see the filesize difference
They say that 23 is good quality and is usually the default. Something like YouTube (if they still used H.264 of course, which I think they don't) would be just below 30
So I'd give 20 a try
I forget if we use lookahead for qsv. That’d be another good one to have if not
La_icq
That is what the option is called I think.
Like in ffmpeg.
Idk about immich
Yeah we don’t use that. I think I tried that mode, but it didn’t work on my cpu.
Oh I know. I show originals on web and previews on mobile in case I'm somewhere with bad internet
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
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.
What gen CPU?
Raptor Lake, 13700H
Bleeding edge so that's probably why.
I know it works on my 8700K
Bleeding edge relative to Linux
Yeah it could be a software issue, I didn’t look too deep into it.
Like open source stuff might not be caught up or Intel didn't bother to add Linux support.
I (probably mistakenly) figured that if it didn’t work on this cpu it probably wouldn’t on older gens either
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
So bleeding edge that I don't think it's hardware encoding works on unraid yet lol so I can't copy him
I can give it a shot yeah
Huh
Man, now I have to test it lol.
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
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.
Exactly what they're doing. Ppl just getting annoyed cause it's been like a year since the last major release, all minor releases since then
TrueNAS Scale does about one major release per year.
Both are server OSes, what do you expect. It's about stability, not bleeding edge.
Looks like they released in June of last year, so they still got time to beat truenas
Not that it affects me, I have no reason to upgrade for a long time