lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.68k stars 261 forks source link

Chroma Key Color Issue #1021

Closed cha1r closed 6 months ago

cha1r commented 6 months ago

Checklist

Write stuff here

Hi, I have been trying to render chats, but I'm having no luck finding a compatible, Chroma key color. Green obviously filters out most pepe emotes and user names, and nearly every other color does the same.

Is there an option that auto removes the background and removes the need for a Chroma key? If not, what color should I be using?

ScrubN commented 6 months ago

Is there an option that auto removes the background and removes the need for a Chroma key? If not, what color should I be using?

Actually there is. In the Windows GUI, it is called "generate mask" and it will produce a black and white video file that can be used as a source for a mask effect in your video editor.

On Sat., Mar. 30, 2024, 2:27 a.m. cha1r, @.***> wrote:

Checklist

Write stuff here

Hi, I have been trying to render chats, but I'm having no luck finding a compatible, Chroma key color. Green obviously filters out most pepe emotes and user names, and nearly every other color does the same.

Is there an option that auto removes the background and removes the need for a Chroma key? If not, what color should I be using?

— Reply to this email directly, view it on GitHub https://github.com/lay295/TwitchDownloader/issues/1021, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARGBYQNDAAMG3FBOM4UICZ3Y2ZLNLAVCNFSM6AAAAABFPJ7RFKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYTMMRYGY2TCNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ScrubN commented 6 months ago

The mask also depends on the background color having an alpha channel, so don't forget to set that.

Don't worry if your output codec doesn't support alpha channels, FFmpeg will take care of it.

On Sat., Mar. 30, 2024, 12:21 p.m. Scrub Null, @.***> wrote:

Is there an option that auto removes the background and removes the need for a Chroma key? If not, what color should I be using?

Actually there is. In the Windows GUI, it is called "generate mask" and it will produce a black and white video file that can be used as a source for a mask effect in your video editor.

On Sat., Mar. 30, 2024, 2:27 a.m. cha1r, @.***> wrote:

Checklist

Write stuff here

Hi, I have been trying to render chats, but I'm having no luck finding a compatible, Chroma key color. Green obviously filters out most pepe emotes and user names, and nearly every other color does the same.

Is there an option that auto removes the background and removes the need for a Chroma key? If not, what color should I be using?

— Reply to this email directly, view it on GitHub https://github.com/lay295/TwitchDownloader/issues/1021, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARGBYQNDAAMG3FBOM4UICZ3Y2ZLNLAVCNFSM6AAAAABFPJ7RFKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYTMMRYGY2TCNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cha1r commented 6 months ago

Thank you for the response! I tried what you said and I was successfully able to export a black and white mask alongside an exported chat render, however I'm unsure how I would go about using said mask for the chroma key, and the chat render that came with it still has a solid background. If its not too much trouble, could you describe a step by step process? I fear I might be misunderstanding your instructions.

ScrubN commented 6 months ago

Most video editors have a masking effect/filter which goes on the source footage and takes in a black & white mask that is used to selectively apply transparency to said source footage.

If you are using Sony Vegas, masking is done via compositing. This video explains it well https://youtu.be/8fNTUEEFhdY, but you will need to add a mask generator effect to the mask source set to luminance because it does not contain an alpha channel.

cha1r commented 6 months ago

Thank you again for your response! I'm still struggling a bit here.

Here is what I've gathered, let me know if I'm missing something

  1. Generate mask - used for source for mask
  2. background color must have alpha channel
  3. composite of some kind for mask - need a mask generator effect to the mask source

Heres what I've been doing. Currently I am exporting my chats and leaving only the A channel at around half transparency, with all other colors set to 0, once exported I get two video files, one regular text chat with a black background, full color emotes ect, and one grey and white mirror file, which I assume is the mask that was generated. From there, I want to bring that into my editor (premier) and use some form of mask generator to eliminate the solid black of my original chat (the one with a solid black background which I seek to make transparent) using the generated mask. Note I also tried this with a mask export that is solid black, and white text + emotes, and I'm not having luck with it either.

I guess I am failing to see how the generated mask comes into play here. I get that its needed for the selective transparency, I just fail to see how the black and white base achieves this as my primary chat remains untouched.

I'm sorry to take up your time with this, and thank you for all of your help

ScrubN commented 6 months ago

It seems the feature you are looking for in premiere is called Track matte.

cha1r commented 6 months ago

Thank you for the help Scrub! I've got it figured out now, I'll close this issue.