How to get alpha channel from RGBA video ?

Mathieu Virbel mat at
Fri Mar 18 10:44:15 PDT 2011

Hi folks,

I'm trying to get alpha working from a avi video, without success.
My video is a set of uncompressed PNG image, 32 bpp. Even if my
current code is in Python, the pipeline look like:

filesrc location=rgbavideo.avi ! decodebin ! ffmpegcolorspace !
! appsink

After getting the buffer from appsink, the alpha channel is still 0xff :
>>> print set([3::4])

The caps detected by decodebin/avidemux is:
video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321,
red_mask=(int)65280, green_mask=(int)16711680,
blue_mask=(int)-16777216, framerate=(fraction)25/1, width=(int)1080,

With ffmpeg, i'm able to convert the video into png, and the png got
the alpha background. FFMpeg show :
Input #0, avi, from 'Fleches_3.avi':
  Duration: 00:00:10.00, start: 0.000000, bitrate: 466965 kb/s
    Stream #0.0: Video: rawvideo, bgra, 1080x540, 25 tbr, 25 tbn, 25 tbc

I've tryied to use ffdemux_avi instead of decodebin, without success.

Is anyone have an idea about how to get the alpha channel from the
video source ?



More information about the gstreamer-devel mailing list