How to set up a video with transparency?

hello!
I want to have video that has parts of it transparent. I couldn’t import any video files that support alpha channels so I read somewhere that I can achieve video transparency by adding a B&W matte/luma video and make it a mask/opacity layer in the video material editor. But how exactly do I do that?

The first texture is the h264 video imported through media player, the second the same h264 but B&W matte/luma version without sound. When I connect the second one with opacity mask nothing happens. And also, I can’t change sample type for the first one to masked.