4

Is there a way to remove black background from an existing video and make it transparent?

I've got this video with a black background and a moving person on the center - the client wants me to remove the background from the video so it will look like a sprite and can blend in with the background of the site - but I have no idea how to do that.

I stumbled upon this awesome thing https://jakearchibald.com/scratch/alphavid/ and I tried the source code - It did removed the black background but it messed up the character in the middle - it made it look like a black smoke and transparent.

I wonder if there's a "Blend" in css / js trick to make a black color go away from the video. (or maybe a js library)

I am L
  • 4,288
  • 6
  • 32
  • 49
  • 4
    You can do this by drawing the video to a canvas every millisecond or so, and then manipulating the pixel data: https://stackoverflow.com/a/10021707/2444210 You may want to move this processing code into a Web Worker to keep it from blocking the main site. But it would be even easier to just use a video suite like After Effects to chroma key out the black and re-render it. – IceMetalPunk Jul 12 '19 at 19:51
  • Oh wow it worked, thanks! Do you want to post this as a proper answer so I can accept it? @IceMetalPunk – I am L Jul 12 '19 at 20:27
  • 1
    I don't think S/O is okay with answers that just link to other things. But I'm glad it helped! :) – IceMetalPunk Jul 12 '19 at 20:59

0 Answers0