by tagrun · 2y ago · 0 comments
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 yet reliable as the officially supported VDPAU or NVDEC, and is not included in official linux package repositories.)
Intel has VA-API, AMD has AMF, and NVIDIA has VDPAU which is being replaced by NVDEC/NVENC.
The idea behind Vulkan Video Extensions is to have a vendor independent and cross-platform video API.
Intel is behind VA-API originally, but I don't think it's fair to say it's a vendor specific API anymore. It's supported by the open source drivers for GPUs from all 3 vendors. It's just that the open source drivers for Nvidia cards are not very practical and the proprietary drivers only support vdpau and nvdec/nvenc
Intel, AMD and NVIDIA have their own vendor-specific video APIs, and even when they provide official support for the API of another vendor, it tends to expose a limited subset of the full functionality (like the list of available codecs and encoding features).
You are free to call these vendor specific APIs for what they are or something else, but the reality has been that there is no single video API officially supported by Intel, AMD and NVIDIA. This changed with Vulkan Video.
But Vulkan Video isn't just about desktop: mobile devices, Raspberry Pi, etc. are expected to get on board with it eventually, just like they did with Vulkan.
> It's supported by the open source drivers for GPUs from all 3 vendors.
Which 3 vendors are you referring to? Intel, AMD, and who?
> It's just that the open source drivers for Nvidia cards are not very practical and the proprietary drivers only support vdpau and nvdec/nvenc
Why are you bringing up open source drivers, and what is not practical? Both official open source drivers (open-gpu-kernel-module) and unofficial open source drivers (nouveau, through binary firmware) support VDPAU. However, NVIDIA's drivers (open source or binary) does not support VA-API.
By the way, nouveau's support is currently limited and not useful: https://nouveau.freedesktop.org/VideoAcceleration.html see Video engine support status table, only old GPUs and no H.265 or AV1 support.
Incorrect. Firefox uses Windows Media Foundation, which is cross-vendor, on Windows. It uses MediaCodec on Android which is again cross-vendor. Presumably it uses whatever iOS' equivalent is as well.
It only uses VA-API on a single OS, Linux, and that's probably more a reflection on the media qualities (or lack thereof) of Linux as a whole. Maybe Vulkan video extensions will be the savior on Linux. Or maybe it won't because it won't be anyone's focus of investment since it's largely a Linux-only problem in the first place.
> Firefox currently supports hardware video decoding with Intel's vendor specific VA-API only on Linux, which is not supported by NVIDIA.
(emphasis added)
You further wrote:
> Firefox uses Windows Media Foundation, which is cross-vendor, on Windows. It uses MediaCodec on Android which is again cross-vendor.
And? None of those APIs are cross-platform. Vulkan Video will eventually allow developers (including Firefox developers) to write a single code path for video to cover a wide range of platforms and vendors (likely with the exception of walled gardens like Apple-land, although someone might find a way to support like via a wrapper like MoltenVk for Vulkan).
What are you talking about? They didn't quote that sentence at all, and didn't cut in the middle of the sentence they quoted.
> And? None of those APIs are cross-platform.
Your original objection, the thing that got quoted, was about whether things are cross-vendor. That question is completely unrelated to whether things are cross-platform.
Obviously, I meant to say statement, not sentence, but I can't edit it anymore.
> The idea behind Vulkan Video Extensions is to have a vendor independent and cross-platform video API.
(emphasis added)
On Windows there's Windows Media Foundation and DirectShow that centrally manage everything and also support the "individual nut and bolt" approach. Android has its own central thing (MediaCodec?) that must be used. MacOS and iOS presumably have their own central manager (Quicktime?) too.
But Linux? It doesn't serve as an operating system for media. It's tremendously inconvenient as an admin/user rather than an evangelist.
Comparison is also invalid. Linux as a whole (not the kernel but OS experience) isn't controlled by some Big Brother who decides what and how it's done single mindedly. So such kind of composite result is somewhat expected.
Yeah, binary software will have to ship its own copy of ffmpeg... This isn't unique to media codecs though.
No perfect solutions here; both "system-wide codecs" and "every application brings their own codecs" have their own up- and downsides.
Besides, with ffmpeg and gstreamer the system-wide codecs paradigm also works on Linux.
This is one of those "it's different but it doesn't really matter much" type of things. Most people "just" install vlc or mpv or whatnot and things will "just work" for them, not really different from Windows. That it's technically slightly different is almost entirely transparent to the user.
Ideally that kind of thing would be part of GNOME, or KDE, but then there are those that rather keep using twm like experience, making GNU/Linux really only good for headless experiences, at least the UNIX/POSIX part is always there.
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.