I’m running headless Chromium with Puppeteer in my Azure Web App Service’s container:
const browser = await puppeteer.launch({
headless: true,
executablePath: await this.browserDownloader.getPath(),
handleSIGINT: false,
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-web-security',
'--disable-site-isolation-trials',
'--user-data-dir=.',
'--use-gl=egl',
'--enable-features=sharedarraybuffer',
'--enable-features=VaapiVideoDecoder',
],
});
Here are the details obtained by running lscpu
through SSH in my Azure Web App Service:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Vendor ID: AuthenticAMD
Model name: AMD EPYC 7763 64-Core Processor
CPU family: 25
Model: 1
Thread(s) per core: 2
Core(s) per socket: 1
Socket(s): 1
Stepping: 1
BogoMIPS: 4890.86
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves xsaveerptr arat umip vaes vpclmulqdq rdpid fsrm
As far as I know, Azure Web App Service containers don’t have GPUs. Right?
I’m using Chromium to open my basic React app, which uses Zoom’s Web SDK to extract video streams from meetings. It works as expected!
However, when streams are started and being extracted, Zoom’s Web SDK is giving me the following logs:
> VP9?: false AMD?: false AMDdecodecheck: true isenbaleHD:true enable720p?: false capacityfor720: false
> Can't subscribe to 720p video stream, will downgrade to 360p stream
I suspect this is because my machine and the Chromium running on it don’t support the VP9 codec.
I also think that hardware-accelerated video decoding might be needed for higher resolution streams, but I’m not sure.
My question is:
Is it possible to enable hardware acceleration (and/or the VP9 codec) in Chromium on a machine with no GPU running an AMD EPYC 7763 CPU on Linux?
If not, are there alternative ways to simulate hardware acceleration or VP9 in a browser running on Linux?
Are there any configurations, command-line flags, or software decoding options in Chromium that I can use to achieve this?
Any insights or suggestions would be greatly appreciated.
What I’ve tried:
I tried running the code locally in Google Chrome on my Windows machine with an AMD Ryzen 5 3600 6-Core Processor CPU and an NVIDIA GTX GeForce 1660 Ti GPU. I received the following log from Zoom’s Web SDK:
VP9?: true AMD?: false AMDdecodecheck: true isenbaleHD:true enable720p?: true capacityfor720: true
No downgrading happened, and the stream was perfectly extracted in 720p!
I checked chrome://gpu/
and saw this:
Graphics Feature Status
=======================
* **Canvas:** Hardware accelerated
* **Canvas out-of-process rasterization:** Enabled
* **Direct Rendering Display Compositor:** Disabled
* **Compositing:** Hardware accelerated
* **Multiple Raster Threads:** Enabled
* **OpenGL:** Enabled
* **Rasterization:** Hardware accelerated
* **Raw Draw:** Disabled
* **Skia Graphite:** Disabled
* **Video Decode:** Hardware accelerated
* **Video Encode:** Hardware accelerated
* **Vulkan:** Disabled
* **WebGL:** Hardware accelerated
* **WebGL2:** Hardware accelerated
* **WebGPU:** Hardware accelerated
* **WebNN:** Disabled
Video Acceleration Information
=======================
...
Decode vp9 profile0 : 64x64 to 8192x8192 pixels
Decode vp9 profile2 : 64x64 to 8192x8192 pixels
...
However, when I open chrome://gpu/
in Chromium on my local WSL machine, I see the following for the same stats:
Graphics Feature Status
=======================
* **Canvas:** Software only. Hardware acceleration disabled
* **Canvas out-of-process rasterization:** Disabled
* **Direct Rendering Display Compositor:** Disabled
* **Compositing:** Software only. Hardware acceleration disabled
* **Multiple Raster Threads:** Disabled
* **OpenGL:** Disabled
* **Rasterization:** Software only. Hardware acceleration disabled
* **Raw Draw:** Disabled
* **Skia Renderer:** Enabled
* **Video Decode:** Software only. Hardware acceleration disabled
* **Video Encode:** Software only. Hardware acceleration disabled
* **Vulkan:** Disabled
* **WebGL:** Disabled
* **WebGL2:** Disabled
* **WebGPU:** Disabled
Video Acceleration Information
=======================
EMPTY (no rows in this table)