Using transparency on .mp4 video

hi guys, i am trying to implement an error pop-up in the top of the screen to tell the user if something isn’t working correctly. To do this, i made a good enough animation of the pop up appearing, staying on screen for x time and then disappearing, but when i start the video everything goes black, even if the background is transparent. Code:

self.error_in_texture = MovieTexture("error_in")
success_ = self.error_in_texture.read("A_CLIENT/ASSETS/GAME/CINEMATICS/error.mp4")
assert success_, "Failed to load video!"

error_in_cm = CardMaker("error_in")
error_in_cm.setFrameFullscreenQuad()

error_in_cm.setUvRange(self.error_in_texture)

self.error_in_card = NodePath(error_in_cm.generate())
self.error_in_card.setTexture(self.error_in_texture)
self.error_in_card.setTransparency(TransparencyAttrib.MAlpha)

self.error_in_texture.loop = False
self.error_in_texture.setLoop(False)

i used .setTransparency(TransparencyAttrib.MAlpha) because i already use it to have good shapes on buttons and entries and so on, but here it doesn’t work.

Note: the background that should be underneath is another video that simply ends and stays on the last frame.

Since i’m already here, is there a way to move text smoothly over time, to kind of make it appear with the pop up?

I don’t know about the matter of the video, but this I might be able to help with:

There are a few ways that it might be done, I believe, but two simple approaches are to either use an interval (perhaps a “LerpPosInterval”), or to use a task and move it yourself.

1 Like

It looks like mp4 does not support an alpha channel (i.e., transparency). It looks like WebM does, so I would try re-exporting to that if you can.