Hi, I have a .webm video with an alpha channel which presence is confirmed by ffprobe:
Input #0, matroska,webm, from 'front_HD.webm':
Metadata:
encoder : libwebm-0.2.1.0
creation_time : 2022-08-31T09:32:51.000000Z
Duration: 00:00:05.96, start: -0.007000, bitrate: 8095 kb/s
Stream #0:0(eng): Video: vp8, yuv420p(progressive), 720x1280, SAR 1:1 DAR 9:16, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
Metadata:
alpha_mode : 1
Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
When loading the video with VideoCapture however, I get frames of shape 720x1080x3 i.e. the alpha channel is missing.
According to Add support for reading 4-channel BGRA frames from video by anmoluppal · Pull Request #13395 · opencv/opencv · GitHub CAP_PROP_CONVERT_RGB=False should allow for RGBA frames but even with this the alpha chennel is missing when iterating over the frames.
Is it possible to read a video (in this case a .webm) preserving the alpha channel?
Thanks,
Andrea