obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60k stars 7.94k forks source link

Alpha channel recording not working since OBS 28.0.3 #8133

Closed dalekcoffee closed 1 year ago

dalekcoffee commented 1 year ago

Operating System Info

Windows 11

Other OS

windows 10 and 11

OBS Studio Version

28.1.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/WXO1NIh3xBJPOsAJ

OBS Studio Crash Log URL

No response

Expected Behavior

Record video with alpha channel transparency

Current Behavior

Footage does not have alpha channel, and renders alpha as black

Steps to Reproduce

WORKING V28.0.3:

  1. Install OBS
  2. Navigate to settings>Output
  3. Set output mode to advanced
  4. Go to recording tab
  5. Set the following settings: image
  6. Go to advanced settings
  7. Set Color format to RGB
  8. Record
  9. Product:

https://user-images.githubusercontent.com/78516780/214217788-e7cc05a2-6913-4a04-99f7-de29f022e0e7.mov

NOT WORKING V29

  1. Install OBS
  2. Navigate to settings>Output
  3. Set output mode to advanced
  4. Go to recording tab
  5. Set the following settings: image
  6. Go to advanced settings
  7. Set Color format to RGBA
  8. Record
  9. Product:

https://user-images.githubusercontent.com/78516780/214217902-31842642-534d-462d-b7a6-aa176e1a9622.mov

These videos can be opened in davinci resolve or any other video editor that supports alpha channel to check the transparency, but for context I went ahead and obtained the following screenshots of what happens

OBS 28.0.3 image

OBS 29 image

Anything else we should know?

We discovered this issue through updating, and slowly downgraded release by release, it appears this was last working on obs 28.0.3. Anything after does not work.

Fenrirthviti commented 1 year ago

Just as a note to anyone looking at this, I'm reasonably sure that we don't consider this a supported use case, at least currently. It was a surprise to most of us on the project that this ever worked in the first place.

Which is to say, I don't think there is a bug that needs to be fixed or a regression that needs to be investigated, but more of a core change in philosophy of how we handle alpha on output. If we want to support alpha output, we should do so properly, not with a set of undocumented magic settings that happened to work incidentally.

I'll leave this open for visibility for now, but at this point, my opinion is that this is a feature request.

dalekcoffee commented 1 year ago

Thank you for your consideration!. I hope we gather enough interest for it to become a supported feature. The demographic for this (at least in my case) is virtual creators/vtubers. We can make great use of an alpha channel 💜

flaeri commented 1 year ago

I figured I'd do a little write up to tidy you over for the moment. Completely unsupported, but it works for the time being. Here is what I do when I want/need alpha chanel output:

You can use pixel_format=xxxx in the "Video Encoder" field.

You can find the supported pixel format in ffmpeg by querying the encoder for its supported pixel formats via: ffmpeg -h encoder=xxxx (seperate from OBS).

The alpha supported formats usually have an "a" (alpha) in their name. For example, PNG that would be "rgba", cineform is "grabp12le" and qtrle would be "argb". There are more, but you get the gist.

As the devs have said, this is in no way supported. It can and will (as we've seen) break at any point. Just a happy accident ;)

Knipnogg commented 1 year ago

Also very interested in this! I know it's all unofficial, but I am also having an issue where it appears that RGB is not an option for Color Format for me. I am using OBS 29.0.0. Do I need a plugin?

I am also uncertain how to query the encoder?

Thanks!

dalekcoffee commented 1 year ago

I figured I'd do a little write up to tidy you over for the moment. Completely unsupported, but it works for the time being. Here is what I do when I want/need alpha chanel output:

You can use pixel_format=xxxx in the "Video Encoder" field.

You can find the supported pixel format in ffmpeg by querying the encoder for its supported pixel formats via: ffmpeg -h encoder=xxxx (seperate from OBS).

The alpha supported formats usually have an "a" (alpha) in their name. For example, PNG that would be "rgba", cineform is "grabp12le" and qtrle would be "argb". There are more, but you get the gist.

As the devs have said, this is in no way supported. It can and will (as we've seen) break at any point. Just a happy accident ;)

Thank you for this!. Me and a friend are on 28.0.3 for the time being, but since upgrading and downgrading is so easy I will happily give this a try. Thank you! 😁😁🙌

Knipnogg commented 1 year ago

I figured I'd do a little write up to tidy you over for the moment. Completely unsupported, but it works for the time being. Here is what I do when I want/need alpha chanel output: You can use pixel_format=xxxx in the "Video Encoder" field. You can find the supported pixel format in ffmpeg by querying the encoder for its supported pixel formats via: ffmpeg -h encoder=xxxx (seperate from OBS). The alpha supported formats usually have an "a" (alpha) in their name. For example, PNG that would be "rgba", cineform is "grabp12le" and qtrle would be "argb". There are more, but you get the gist. As the devs have said, this is in no way supported. It can and will (as we've seen) break at any point. Just a happy accident ;)

Thank you for this!. Me and a friend are on 28.0.3 for the time being, but since upgrading and downgrading is so easy I will happily give this a try. Thank you! 😁😁🙌

If you come up with something, please let me know! :)

dalekcoffee commented 1 year ago

I figured I'd do a little write up to tidy you over for the moment. Completely unsupported, but it works for the time being. Here is what I do when I want/need alpha chanel output: You can use pixel_format=xxxx in the "Video Encoder" field. You can find the supported pixel format in ffmpeg by querying the encoder for its supported pixel formats via: ffmpeg -h encoder=xxxx (seperate from OBS). The alpha supported formats usually have an "a" (alpha) in their name. For example, PNG that would be "rgba", cineform is "grabp12le" and qtrle would be "argb". There are more, but you get the gist. As the devs have said, this is in no way supported. It can and will (as we've seen) break at any point. Just a happy accident ;)

Thank you for this!. Me and a friend are on 28.0.3 for the time being, but since upgrading and downgrading is so easy I will happily give this a try. Thank you! 😁😁🙌

If you come up with something, please let me know! :)

Sure thing, but do be advised, it does work on 28.0.3

Best of all, it even works through NDI! (Sending to another computer)

Knipnogg commented 1 year ago

I figured I'd do a little write up to tidy you over for the moment. Completely unsupported, but it works for the time being. Here is what I do when I want/need alpha chanel output: You can use pixel_format=xxxx in the "Video Encoder" field. You can find the supported pixel format in ffmpeg by querying the encoder for its supported pixel formats via: ffmpeg -h encoder=xxxx (seperate from OBS). The alpha supported formats usually have an "a" (alpha) in their name. For example, PNG that would be "rgba", cineform is "grabp12le" and qtrle would be "argb". There are more, but you get the gist. As the devs have said, this is in no way supported. It can and will (as we've seen) break at any point. Just a happy accident ;)

Thank you for this!. Me and a friend are on 28.0.3 for the time being, but since upgrading and downgrading is so easy I will happily give this a try. Thank you! 😁😁🙌

If you come up with something, please let me know! :)

Sure thing, but do be advised, it does work on 28.0.3

Best of all, it even works through NDI! (Sending to another computer)

Great to know! I can certainly downgrade (I think), but I still don't know how to find RGB as a color format or how to "query the encoder" to find the pixel formats. Would someone mind explaining that process to me?

dalekcoffee commented 1 year ago

I'm not familiar with

I figured I'd do a little write up to tidy you over for the moment. Completely unsupported, but it works for the time being. Here is what I do when I want/need alpha chanel output: You can use pixel_format=xxxx in the "Video Encoder" field. You can find the supported pixel format in ffmpeg by querying the encoder for its supported pixel formats via: ffmpeg -h encoder=xxxx (seperate from OBS). The alpha supported formats usually have an "a" (alpha) in their name. For example, PNG that would be "rgba", cineform is "grabp12le" and qtrle would be "argb". There are more, but you get the gist. As the devs have said, this is in no way supported. It can and will (as we've seen) break at any point. Just a happy accident ;)

Thank you for this!. Me and a friend are on 28.0.3 for the time being, but since upgrading and downgrading is so easy I will happily give this a try. Thank you! 😁😁🙌

If you come up with something, please let me know! :)

Sure thing, but do be advised, it does work on 28.0.3 Best of all, it even works through NDI! (Sending to another computer)

Great to know! I can certainly downgrade (I think), but I still don't know how to find RGB as a color format or how to "query the encoder" to find the pixel formats. Would someone mind explaining that process to me?

Im not familiar with that either to be honest, it's something I will be checking on that this afternoon if I have time. My method (in my reproduction steps) does not require any of that. Tested on 3 different computers myself and with a friend.

But the encoder part, it sounds like I need to install FFMPEG and run that command. I haven't used FFMPEG in CLI before, but have used many applications that implement it. Shouldn't be that bad I dont think