Recent submissions

Comment · 6 months ago
FWIW, the getUserMedia() portion of such a setup remains the same, so you don't lose AEC or anything else coupled there.
Comment · 10 months ago
Comment · 10 months ago
FWIW, you can do this with a few lines of JS in the browser using canvas.drawImage() from an img element followed by canvas.toBlob().
Comment · 1 year ago
Comment · 1 year ago
If only that were true, battery usage would be much better :) Just consider the prominence of content like tiktoks/shorts/reels/etc alone.
Comment · 1 year ago
Unfortunately canvas (rgb'ish) can't overlay as efficiently as <video> (yuv'ish), so there is some power cost relative to the lowest power video overlays.

It really only matters in long form content where nothing else on the page is changing though.

Comment · 1 year ago
The code in Chromium which handles this suspension is here: https://source.chromium.org/chromium/chromium/src/+/main:med...

Basically after detecting silence for 30 seconds or so it switches from a sink backed by the OS audio device to a null sink.

Note: Since this uses a different clock than the audio device we have received some reports that when the context is finally used there can be some distortion at specific tones. The workaround is for sites to use the suspend resume API mentioned in the article.

Comment · 1 year ago
Chrome supports HEVC with transparency on macOS since VideoToolbox does. Other platform decoders don't support it though.
Comment · 2 years ago
Comment · 2 years ago
Comment · 2 years ago
IIRC, that bot used to be called bugdroid. I forget when it switched over, probably somewhere in 2020.
Comment · 2 years ago
Very cool! I think it's missing some entries though. I'm pretty sure we've had at least one in third_party/ffmpeg. Those fixes often land upstream first which might make tracking difficult.
Comment · 2 years ago
Even if you have crash reporting disabled there should be a .dmp generated somewhere in the user profile directory. Manually uploading that to a bug at https://crbug.com/new would allow a Chrome developer to debug it.

If you can't share the dump for similar reasons to why you have crash reporting disabled, you can build minidump_stackwalk from Chromium and use it to generate an unsymbolized stack trace that you can post to the bug. A Chrome developer can then symbolize it.

https://www.chromium.org/developers/decoding-crash-dumps/ has some more details.

Comment · 3 years ago
Often Chrome doesn't know when more frames are needed either, so it's not something we could add an API for unfortunately.

Yes, just feeding inputs 1 by 1 for each dequeue event until you get the number of outputs you want in your steady state is the best way. It minimizes memory usage. I'll see about updating the MDN documentation to state this better.

Comment · 3 years ago
> Ideally I'd like to be able to set the CBR / VBR bitrate

What's wrong with the existing VBR/CBR modes? https://developer.mozilla.org/en-US/docs/Web/API/VideoEncode...

> I don't think you need a shader...

Ah I see what you mean. It'd probably be hard for us to standardize this in a way that worked across platforms which likely precludes us from doing anything quickly here. The stuff easiest to standardize for WebCodecs is stuff that's already standardized as part of the relevant codec spec (e.g, AVC, AV1, etc) and well supported on a significant range of hardware.

> ... instead of round-tripping into a CPU buffer

We're working on optimizing this in 2024, we do avoid CPU buffers in some cases, but not as many as we could.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton