Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#290 closed defect (fixed)

alpha channel not preserved when transcoding

Reported by: matteosistisette Owned by: michael
Priority: normal Component: undetermined
Version: unspecified Keywords: alpha yuva420
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


When transcoding an flv file which has an alpha channel into a video or image file using codecs that support alpha channel (such as h264, or Apple Animation (qtrle), or PNG) the alpha channel is lost and the output video has an opaque background.

An example flv input file with transparency can be downloaded from

It has alpha channel. H264, Apple Animation and PNG all support alpha channel, so if any of these is used as the encoder and if the input video has alpha channel, the alpha channel should be preserved by default when transcoding.

Change History (3)

comment:1 Changed 5 years ago by michael

  • Component changed from FFmpeg to undetermined
  • Priority changed from critical to normal

Did this work in the past?
and full uncut output from ffmpeg and command line used is missing

comment:2 Changed 5 years ago by cehoyos

  • Resolution set to worksforme
  • Status changed from new to closed

Both -vcodec qtrle -pix_fmt argb and -vcodec png -pix_fmt rgb32 encode the alpha channel of your sample as expected.

Does libx264 support encoding an alpha channel?

comment:3 Changed 5 years ago by cehoyos

  • Keywords alpha yuva420 added
  • Resolution changed from worksforme to fixed

The issue - if there ever was one - has been fixed: The output pix_fmt selection for yuva420 input format works now correctly and chooses 32-bit rgb for png and qtrle.

Note: See TracTickets for help on using tickets.