GNOME Bugzilla – Bug 694078
avenc_huffyuv does not respect alpha channel
Last modified: 2013-02-20 09:32:09 UTC
When encoding video/x-raw,format=BGRA to huffyuv, the alpha channel is always blank. This can be reproduced as follows: * Take this huffyuv encoded rgba sample: http://samples.mplayerhq.hu/V-codecs/HuffYUV/camera2_hfyu32.avi (as found here https://ffmpeg.org/trac/ffmpeg/ticket/668) * split of the alpha channel, and inspect that it is correct (it should be a mask that refines the 'wobbly' edges of the source video): avconv -i camera2_hfyu32.avi -vf "[in] format=rgba, split [T1], fifo, lutrgb=r=minval:g=minval:b=minval,[T2] overlay [out]; [T1] fifo, lutrgb=r=maxval:g=maxval:b=maxval [T2]" alpha.avi * decode and re-encode to huffyuv: gst-launch-1.0 filesrc location=camera2_hfyu32.avi ! avidemux ! avdec_huffyuv ! avenc_huffyuv ! avimux ! filesink location=newcamera2_hfyu32.avi * split of the alpha of newcamera2_hfyu32.avi. It is all blank. Re-encoding with libav itself works as expected: avconv -i camera2_hfyu32.avi -vcodec huffyuv out.avi
This seems to be originated from a preference of the huffyuv developer, as explained in [1], section 'Enable RGBA compression'. It seems you have to explicitly set bgr32 (in the HYuvContext, [2]) to >0, in order to enable the alpha channel [1] http://neuron2.net/www.math.berkeley.edu/benrg/huffyuv.html [2] http://git.libav.org/?p=libav.git;a=blob;f=libavcodec/huffyuv.h;h=c464d833c14d72cece19b5c2780fd32df48e8b9b;hb=HEAD
Looking at the latest libav/ffmpeg releases, it seems that some developer has removed alpha channel support from huffyuv[1]. It currently only supports video/x-raw, format=BGRx/RGBx (depending on machine endianness). [1]http://git.libav.org/?p=libav.git;a=commit;h=2ca5ca2957607cf9604cc6068a9ebc898ff37b06
Sounds like this is NOTGNOME then until this functionality gets added back by the libav developers?
Indeed. Alpha support in huffyuvenc has recently been removed from libav (newer than what is included in gst-libav 1.0.5). It is still included properly in ffmpeg, so I filed a bug to libav yesterday. So yes, this is NOTGNOME for sure until libav developers fix it.