Live data from Hacker News

Vulkan video extensions for accelerated H.264 and H.265 encode

khronos.org

81–90 of 110 posts

Re: Vulkan video extensions for accelerated H.264 and H.265 encode

#81
post #28

Earlier quoted context omitted.

> Now we need OBS and Firefox supporting Vulkan video too. Why? They have perfectly great existing hardware decoder offloading APIs via the various OS' native APIs for videos. Why use Vulkan video extensions? It seems like it just complicates things since MacOS/iOS and Android are unlikely to get these and Vulkan on Windows' is a second-class citizen as well. Not to mention the feature & API availability is lagging v…

> They have perfectly great existing hardware decoder offloading APIs via the various OS' native APIs for videos One vendor specific API, not "various OS' native APIs". Firefox currently supports hardware video decoding with Intel's vendor specific VA-API only on Linux, which is not supported by NVIDIA. (A third-party VA-API to NVDEC translation layer for Linux does exist on GitHub, nvidia-vaapi-driver, but it's not…

AMD AMF is not open-source; only the SDK part of it is. The runtime part is closed, bundled with the "pro" drivers.

It is also intended as a multi-platform abstraction.

This makes it a no-go as a platform API. The open drivers for AMD use VA-API.

Re: Vulkan video extensions for accelerated H.264 and H.265 encode

#82
post #61
post #21

Earlier quoted context omitted.

How can I confirm whether Firefox is actually using hardware decode for videos on my machine for a given codec? Is there a magic keyword I should search for within the about:support page, or is it recorded somewhere else? Mine shows for instance "VP9_HW_DECODE default available", does this means it's using hardware decode for VP9, or merely that it might be possible for my Firefox version?

We've put a dedicated section called Media in about:support, it has decoding capabilities and other things such as audio IO informations. If you find that it is not accurate, e.g. by cross-checking via other means, please open a ticket at https://bugzilla.mozilla.org/enter_bug.cgi , component "Audio/Video".

> We've put a dedicated section called Media in about:support, it has decoding capabilities

I see, I hadn't found it when searching for the codec name because it only said something like "Information not available. Try again after playing a video." After opening a random YouTube video and refreshing about:support, it did show the hardware decoding information, and it was as I had expected given the hardware on this computer.

Re: Vulkan video extensions for accelerated H.264 and H.265 encode

#83
post #39

Earlier quoted context omitted.

> Firefox still has no support for hardware video decode on Linux. That's not true at all. See: https://www.omgubuntu.co.uk/2023/07/firefox-115-intel-gpu-vi... https://www.phoronix.com/news/Mozilla-Firefox-115 https://www.omglinux.com/firefox-hardware-acceleration-raspb...

Whilst Firefox may support hardware video decoding, Mesa since March 2022 disables patent encumbered codecs by default[1], and distributions such as Fedora and OpenSuse do not explicitly enable these patent encumbered codecs to avoid possible legal problems. Even Gentoo (built from source code by the user) requires the user to explicitly enable a USE flag (proprietary-codes) to use patent encumbered codecs.[2] The th…

Which is of course a bullshit reason because Linux distributions don't ship the patented hardware decoders (because they are hardwared) so the user already has to assemble the complete system.

> a provider that uses a good choice of codec like AV1

Much more limited HW support and slow as molasses encoders. Not exactly a good choice for most.

Re: Vulkan video extensions for accelerated H.264 and H.265 encode

#84

Earlier quoted context omitted.

Also, to get best compression you don't want to do key frames at even intervals, but rather when it pays off (ie large changes between two frames, like a scene change).

seems rather obvious and i would imagine most encoding algos act accordingly

Not always.DivX, XviD, etc. preferred constant interval key framing to battle with corruption and other transfer hazards.

Re: Vulkan video extensions for accelerated H.264 and H.265 encode

#85
post #8

Earlier quoted context omitted.

Do CPUs have fixed video decoders? I thought those were only included in GPUs, including iGPUs.

Yes, every Intel consumer CPU has included a hardware video block since Haswell, called Quick Sync Video.

That block is a part of the included iGPU though.

Intel CPUs without iGPU, like the F-series, do not support QSV.

Re: Vulkan video extensions for accelerated H.264 and H.265 encode

#86
post #60
post #7

Earlier quoted context omitted.

Beware on Windows, out-of-the-box Microsoft will ship e.g. nvidia drivers that have DirectX 12, but not Vulkan. This can lead to confusing user situations ('DirectX 12 games work fine.. but not Vulkan') and probably means DXVA would be a better choice if targeting Windows

> nvidia drivers that have DirectX 12, but not Vulkan not a thing. at worst you get a situation where the ICD loader isn't installed

In Windows 10 and above, windows update provides a default graphics driver for each IHV, which comes from the manufacturer, has DirectX support, but doesn't have Vulkan.

Often nvidia users will try to debug it, and discover 'the vulkan checkbox is off but I have the latest driver version!' in gpuZ[0][1] - but it happens across all IHVs, AMD, Intel, etc. I was told by someone in the industry the default Microsoft drivers across all IHVs indeed have DirectX, but not Vulkan.

To make matters more annoying, Windows Update often _overwrites_ the user's driver which they installed from the manufacturer directly, leading to Vulkan becoming broken overnight[2][3]

Easy to find multiple instances of this happening[4][5][6], I became aware of it because of someone asking on /r/vulkan a few weeks ago.

[0] https://i.imgur.com/qj3Rn9p.png https://rog-forum.asus.com/t5/rog-strix-series/nvidia-driver...

[1] https://forums.x-plane.org/index.php?/forums/topic/228597-vu...

[2] https://www.reddit.com/r/Amd/comments/1145ffp/windows_update...

[3] https://answers.microsoft.com/en-us/windows/forum/all/window...

[4] https://i.imgur.com/PXZRxYh.png

[5] https://www.reddit.com/r/pcmasterrace/comments/qhfesc/vulkan...

[6] https://www.reddit.com/r/techsupport/comments/110bytq/vulkan...

Re: Vulkan video extensions for accelerated H.264 and H.265 encode

#87
post #67

Earlier quoted context omitted.

Unfortunely I still have to, from time to time. Luckly Android, ChromeOS and WebOS as proper Linux distributions have replaced most of it.

Android hasn't displaced Linux on phones, there wasn't any. ChromeOS hasn't displaced Linux on school laptops, there wasn't any. LG WebOS hasn't displaced "Linux", it competes with Google TV (formerly Android TV)

Oh boy, another Linux advocate on the lose.

So here goes a children explanation.

> Unfortunely I still have to, from time to time.

I, pjmlp, still have to use GNU/Linux desktop from time to time.

> Luckly Android, ChromeOS and WebOS as proper Linux distributions have replaced most of it.

Android, ChromeOS and WebOS, have replaced most of my needs, pjmlp, for GNU/Linux in the desktop and similar devices.

Re: Vulkan video extensions for accelerated H.264 and H.265 encode

#88

Earlier quoted context omitted.

Interestingly, quite a bit of video decode isn't as parallelizable as you might think and isn't a great fit for GPUs. For instance the initial Huffman decoding of the stream is essentially an intrinsically sequential process.

Is there a reason we don't have parallelizable video formats?

They are, H.265 have "slices" and "tiles" that allow parallel decoding.

Re: Vulkan video extensions for accelerated H.264 and H.265 encode

#90
post #86
post #60

Earlier quoted context omitted.

> nvidia drivers that have DirectX 12, but not Vulkan not a thing. at worst you get a situation where the ICD loader isn't installed

In Windows 10 and above, windows update provides a default graphics driver for each IHV, which comes from the manufacturer, has DirectX support, but doesn't have Vulkan. Often nvidia users will try to debug it, and discover 'the vulkan checkbox is off but I have the latest driver version!' in gpuZ[0][1] - but it happens across all IHVs, AMD, Intel, etc. I was told by someone in the industry the default Microsoft driv…

> has DirectX support, but doesn't have Vulkan

The Vulkan implementation is still there. You just have to install the redistributable. (see https://vulkan.lunarg.com/sdk/home - Runtime)

There's no separate Vulkan-less version of the drivers AFAIK - it's just that the installation program of the manufacturer doesn't run so that there's no opportunity to install the Vulkan runtime.

Post reply on HN