Old 01-28-2021, 04:57 AM   #1
christougher
Human being with feelings
 
Join Date: Apr 2020
Posts: 3
Default Using Videos with alpha channel

Hi, I posted this in the main forum but realized this might be the better place to ask... sorry for the double post...

I'm trying to use videos with alpha transparency built in but the alpha only shows up as black and any elements behind are blocked out. Is there a way in Reaper to have transparency in videos without chroma key? Chroma key isn't what I'm after. Other video editors simply work. I use a lot of transparent elements... Is this doable in Reaper or should I do my video editing elsewhere?
christougher is offline   Reply With Quote
Old 01-28-2021, 10:35 AM   #2
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,271
Default

I think you need to add the image overlay preset and set the appropriate parameter to use the source alpha.
ashcat_lt is offline   Reply With Quote
Old 01-28-2021, 02:12 PM   #3
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

In Item Properties > Source Properties, you may also need to enable "Preserve transparency". (I don't know why this isn't enabled by default.)
juliansader is offline   Reply With Quote
Old 01-30-2021, 06:55 AM   #4
christougher
Human being with feelings
 
Join Date: Apr 2020
Posts: 3
Default

Quote:
Originally Posted by juliansader View Post
In Item Properties > Source Properties, you may also need to enable "Preserve transparency". (I don't know why this isn't enabled by default.)
Hi, I can't seem to find the option to preserve Transparency in either the item properties or the source properties... I can't get this working to save my life lol... Image overlay still leaves it black...
christougher is offline   Reply With Quote
Old 01-30-2021, 05:20 PM   #5
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

I quickly tested this with a transparent gif and a transparent mkv, and only the gif has that option in Source properties, so if your video doesn't give that option, it is probably not required.

The transparent mkv worked fine as long as I added the "Image overlay" video processor preset as a take or track FX.

I don't know if REAPER can handle transparency in any and all video formats. Which format are you using? Would it be possible to upload a snippet of the video?


EDIT: If I'm not mistaken, REAPER's video processor can choose from three colorspaces: RGBA, YV12, or YUY2. I wonder if that means that REAPER can't use alpha information of YUVA videos.

Last edited by juliansader; 01-30-2021 at 10:50 PM.
juliansader is offline   Reply With Quote
Old 05-09-2021, 06:12 AM   #6
patko
Human being with feelings
 
Join Date: Feb 2020
Location: nice (fr)
Posts: 5
Default

Quote:
Originally Posted by juliansader View Post
I quickly tested this with a transparent gif and a transparent mkv, and only the gif has that option in Source properties, so if your video doesn't give that option, it is probably not required.

The transparent mkv worked fine as long as I added the "Image overlay" video processor preset as a take or track FX.

I don't know if REAPER can handle transparency in any and all video formats. Which format are you using? Would it be possible to upload a snippet of the video?


EDIT: If I'm not mistaken, REAPER's video processor can choose from three colorspaces: RGBA, YV12, or YUY2. I wonder if that means that REAPER can't use alpha information of YUVA videos.
I'm trying to encode a video with alpha channel, here is what reaper show in source properties:

Video: 960x720@25.00fps, Aspect=1.00, Decoding format=I420/YV12


Using ffmpeg/libav DLL decoder v58.91.100
Video: tiff (tiff / 0x66666974), rgba, 960x720 [SAR 1:1 DAR 4:3] - converted from pixfmt 26


The transparency doesn't show up with image overlay preset.

I've tried with a gif file and it works when "preserve transparency" is enabled.

Could you mention the video format and pixel format of mkv files showing transparency?

Last edited by patko; 05-09-2021 at 06:21 AM.
patko is offline   Reply With Quote
Old 09-09-2021, 12:50 PM   #7
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

I recently played around with transparent videos again.

As I guessed in my previous comment, REAPER doesn't seem to recognize the alpha channel of YUVA-encoded videos. Only RGBA-based formats (rgba, bgrp, rgb32, etc) can provide an alpha channel.

If a video is encoded in a YUV format, there are two (or more) solutions:

1) Convert the video to RGBA. FFMPEG's own FFV1 format is a good lossless option:
Code:
ffmpeg -vcodec libvpx-vp9 -i input.webm -vcodec ffv1 -pix_fmt rgb32 output.mkv
(This is just a basic command that can be tweaked to make it faster. For vp9-encoded videos, the -vcodec libvpx-vp9 option is necessary to force the decoder to recognize the alpha channel.)

2) Extract the alpha channel to a separate greyscale video, and then use that as a transparency mask with wwwmaze's video script:
Code:
ffmpeg -vcodec libvpx-vp9 -i input.webm -vf alphaextract mask.mp4
juliansader is offline   Reply With Quote
Old 10-22-2022, 08:36 AM   #8
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by juliansader View Post
I recently played around with transparent videos again.

As I guessed in my previous comment, REAPER doesn't seem to recognize the alpha channel of YUVA-encoded videos. Only RGBA-based formats (rgba, bgrp, rgb32, etc) can provide an alpha channel.

<snip>
Hi!

I am resurecting an old thread here but the information julainsader provided here proved crucial making it work in my project. I have a video source pre-processing project consisting of about 50 sources to which (among other transformations) I am adding an alpha transparency frame. I needed to render each source in a format that supports RGB+alpha. SO far the only combinations that work using the extended FFMPEG lib are
- mkv or avi container + FFV1
- mkv or avi container + HUFYuv
but they generate huge files (lossless!)

I know that WEBM + FP9 should work but all my sources are in YV12 and the resulting file also. Is there a way to hack FFMpeg in Reaper into generating an RGBA file?

Last edited by papagirafe; 10-22-2022 at 04:29 PM. Reason: incorrect info
papagirafe is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.