跳到正文
DEV Community· NullPointerZen·· 4 小時前AI 評分56

ImgIng 背景模糊在講者周圍留下暗環,作者改用透明 WebM 疊加模糊空背景板

Background blur left a dark ring around the speaker, so I export transparent WebM and blur an empty plate

AI 導讀

NullPointerZen 實測 ImgIng 影片摳像工具的背景模糊功能,發現它把原始畫面中的人物一併模糊,令講者輪廓外出現暗環。以四個畫格平均計,輪廓外首 4 px 比空房參考畫面分別暗 67.8 級(強度 18)和 63.1 級(強度 40),亮度刻度為 0 至 255。作者的替代流程是匯出透明 WebM,疊在沒有講者的模糊背景板上;他未有在任何剪輯軟件中測試該 WebM。

正文

Blurred background comes up a lot at work for talking-head clips, so I tried the blur option in a browser video matting tool, zoomed in, and found a dark ring hugging the speaker's head. The ring comes from blurring a frame that still has the person in it, so feathering the mask won't fix it. What I do now is export a transparent WebM and blur a background plate with nobody in it. If the plate you blur is the original clip with the person still in it, the ring comes back.

I used ImgIng (https://imging.ai/), whose video matting is still marked Beta and runs in a desktop Chrome or Edge tab, on the live site on 2026-10-20, on an M4 Mac running Chromium 149, no GPU acceleration. The clip isn't mine. It's a 7.92-second, 478×850 sign language clip from Wikimedia Commons, uploaded by Sayvhior with JudithNG12 signing, CC BY-SA 4.0. She wears a headscarf, so this says nothing about loose hair.

One frame with six backgrounds: original, solid, image, blur 18, blur 40, transparent

Left to right: original, solid colour, background image, blur 18 (default), blur 40, transparent. Only the two blurred panels have a dark shadow above the head. Video: Sayvhior / Wikimedia Commons, CC BY-SA 4.0 (signing by JudithNG12); this comparison is shared under CC BY-SA 4.0 too.

Blur mode smears the speaker into the background

As far as I can tell, blur mode blurs the original frame, person included, and puts the sharp cut-out on top. Whatever is dark about the person, here the clothes and the top of the head, gets smeared into the background and stays there. I measured it against an empty-room reference stitched together from the clip itself, brightness on a 0 to 255 scale, averaged over four frames. On this 478×850 clip the first 4 px outside the edge were 67.8 levels too dark at strength 18 and 63.1 at 40. At 18 the visible part reaches about 16 to 32 px out; at 40 it goes past 32 px and fades into noise somewhere within 64. Turning strength up spreads the ring out; it doesn't make the inner edge any lighter. My first idea was to soften the mask edge, so I tried a heavy feather in a script. On screen the ring was still there, and I stopped fiddling with the mask.

Head at 2x zoom, blur 18 left, blur 40 right

Left is 18, right is 40, both at 2x; on the right the grey shadow spreads much further past the headscarf. It's dark because the background is light and the clothes dark. Flip the contrast, pale clothes against a dark room, and I'd bet on a light ring, though none of my footage could show that. Credit as above, CC BY-SA 4.0.

Transparent WebM over an empty plate

Choose Transparent and the MP4 option greys out; the button becomes "Export WebM", since its H.264 MP4 has nowhere to put alpha. My file came out at 1,465,639 bytes against 1,120,193 for the blur-18 MP4. Then you need a background with nobody in it: a few seconds of the empty room filmed before the speaker steps in, or any photo if the exact room doesn't matter. Building one from the clip only half works. My reference covered just 62.5% of the frame, because the signer never left the area behind her torso. In the editor the blurred plate goes on the bottom track and the WebM above it. I checked the idea with a small script on the same clip, strength 18, four frames. Blurring the full frame and putting the cut-out back left the band 4 to 16 px out 15.4 levels too dark. Filling the person out first, with the fill grown 4 px past the mask, then blurring, landed within one level. The easy editor shortcut, duplicating the original clip, blurring it and dropping the cut-out on top, rebuilds the ring.

What I have not checked yet

I didn't try the WebM in any editor, so test yours with a short clip first. Even ffmpeg needed -c:v libvpx-vp9 to give me the alpha. My filled test still showed a hairline dark outline right at the edge. I didn't measure it, and I'd expect the WebM's soft edge to bring it along. On fast hand-waving frames both model tiers left soft, blocky edges, and without GPU help the quality tier needed about four to five times the compatible tier's time. It's desktop-only, and I never touched the MatAnyone2 tier; it's marked non-commercial testing only. Before committing to blur mode I now zoom one still frame to 2x around the head, and if the ring shows I go the transparent route with three seconds of empty room filmed first.

來源:DEV Community · dev.to