Recording video with alpha background.

Tavern Senses

New Member
I'm filming myself waist up in front of a green screen. The built-in OBS chroma key filter is excellent, and the green screen is perfectly removed. Also, there is no green spill on me, so again, perfect!

PROBLEM: The background is solid black, not alpha. So, if I want to use the video in a video editor, to set against a background of choice, how can I do the recording with an alpha background (checkered pattern)?

PS: I tried changing the black background to a perfect green background. No problem in OBS. I then exported the video with green background to the video editor, and used the chroma key of the video editor to turn the green background into alpha. Unfortunately, the chroma key filter of the video editor isn't nearly as good as that of OBS, so lots of green spill and green edges around my silhouette. Meaning this is not an option.
 

Notinasnaid

New Member
I find myself with a similar question, which probably has the same answer. I want to output video with alpha, as filtered by OBS from a scene, in this case to bring back in to OBS as a source (to be used as a video overlay on demand). I see clues that it is going to depend on the output video format chosen and some particular encoding parameters, but has anyone any recommendations for a format particularly suited to bringing back into OBS? Or are these uncharted waters? Thanks in advance!
 

Notinasnaid

New Member
Replying to myself, research suggests ProRes 4444 is the format I need. If I choose output options
Advanced
Container format: MOV
Video encoder: prores_ks
Video encoder settings: profile=4
This does produce ProRes 4444. (Leaving off profile=4 does not produce this, so the encoder settings are seen).
But I cannot persuade it to write alpha, which should be the default, but adding alpha_bits=8 doesn't seem to help.
The file written, used as a media source, has no Alpha. Perhaps it isn't expected to work and doesn't pass alpha to ffmpeg anyway...

I have found another way to get the same effect: record the overlay complete with the green screen, and define it as a video source with Chroma Key filter. This works, but I would rather do the keying work in advance, I fear for the performance of OBS if it is asked to run keying on multiple sources at the same time.
 

FerretBomb

Active Member
Unfortunately, I'm fairly certain that OBS does not support exporting video with embedded alpha. I vaguely remember being told by a dev that alpha-data was stripped at the compositing merge step, but cannot support this with any exact references so it may be incorrect.
Most video formats do not support embedded alpha to begin with. It would also result in ABSOLUTELY ENORMOUS video files, as alpha-channel data cannot be compressed efficiently and still maintain the needed fidelity for use as an alpha channel. ProRes usually are hundreds of megs per minute, if not outright gigs per minute.

There are lots of very good reasons to just record and chromakey in your NLE of choice. If nothing else, a postprocessing key can be tailored MUCH more closely than the rough approximation that a realtime key has to use.
 

Big Lemon

New Member
It is possible, just be aware of the huge CPU consumming...

1. Go to advanced setting and set color space to RGB
2. Go to Output menu and select advanced, then goto the record tab
3. Set container to mov
4. Set video encoder to png

Now you can record video with alpha channel, you can import it into Adobe Pr to edit as well.
;) I know you will love me
 

toshfox

New Member
It is possible, just be aware of the huge CPU consumming...

1. Go to advanced setting and set color space to RGB
2. Go to Output menu and select advanced, then goto the record tab
3. Set container to mov
4. Set video encoder to png

Now you can record video with alpha channel, you can import it into Adobe Pr to edit as well.
;) I know you will love me
Yes but it is not perfect , it stop working after 5secs .. and sometimes it works agan then not again ...
 
Top