ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Is Exporting Alpha Channel in h.264 Possible?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Matt Long
Is Exporting Alpha Channel in h.264 Possible?
on Sep 24, 2010 at 9:43:42 pm

I've found conflicting reports around the internet--some saying h.264 supports alpha and other say it doesn't. I need to confirm this. Is anyone aware of a definitive source for confirming this one way or another?


Return to posts index

Dave LaRonde
Re: Is Exporting Alpha Channel in h.264 Possible?
on Sep 24, 2010 at 9:57:36 pm

H.264 files DO NOT support alpha channels. End of discussion.

H.264 is designed as a DELIVERY codec: it's meant to be played. Unfortunately, some camera makers also use it as an acquisition codec.

But one thing is for certain: H.264 is not an INTERMEDIATE codec, which preserves the highest quality possible for use in other multimedia-producing applications, and which also supports alpha channels.

The fact that H.264 is a video production codec of absolutely last resort is common knowledge around here. It cannot withstand rendering and re-rendering without losing image quality hand over fist. It's a delivery codec. It's a codec of final use.

But it sounds like you want something you can point to. So go here:

http://en.wikipedia.org/wiki/H.264#Applications

...and notice that the term "alpha channel" is never, EVER mentioned.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Matt Long
Re: Is Exporting Alpha Channel in h.264 Possible?
on Sep 24, 2010 at 10:43:15 pm

Awesome Dave! Thank you. That's exactly what I needed. A definitive answer. I would have preferred it the other way, but I'm glad to know now.

I'm trying to create a video for iPad that retains alpha information. According to Apple they support:

- H.264 video up to 720p, 30 frames per second,
- MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second
- Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels

We've ruled out h.264, but would either of these other two formats support alpha, to your knowledge? Clearly I'm new to this so if I'm asking the wrong questions, please bear with me and let me know what I'm missing.

Thanks again.


Return to posts index


Todd Kopriva
Re: Is Exporting Alpha Channel in h.264 Possible?
on Sep 25, 2010 at 12:47:03 am

> but would either of these other two formats support alpha, to your knowledge?


No.

> Clearly I'm new to this so if I'm asking the wrong questions, please bear with me and let me know what I'm missing.


Here's an excerpt from After Effects Help that gives you what you need to know to find out for yourself if you can export an alpha channel in a particular format:

"Many file formats can include an alpha channel, including Adobe Photoshop, ElectricImage, FLV, TGA, TIFF, EPS, PDF, and Adobe Illustrator. AVI and QuickTime (saved at a bit depth of Millions Of Colors+), also can contain alpha channels, depending upon the codec (encoder) used to generate the images stored in these containers. For Adobe Illustrator EPS and PDF files, After Effects automatically converts empty areas to an alpha channel.

When specifying the color depth for an output image, the plus sign (as in Millions Of Colors+) denotes an alpha channel. Similarly, choosing to output to 32 bits per pixel implies an output depth of 8 bits per channel for each of four channels: RGBA."

BTW, if you're new to After Effects, I recommend starting here.


---------------------------------------------------------------------------------------------------------
Todd Kopriva, Adobe Systems Incorporated
Technical Support for professional video software
After Effects Help & Support
Premiere Pro Help & Support
---------------------------------------------------------------------------------------------------------


Return to posts index

Dave LaRonde
Re: Is Exporting Alpha Channel in h.264 Possible?
on Sep 27, 2010 at 2:19:12 pm

[Matt Long] "I'm trying to create a video for iPad that retains alpha information. According to Apple they support:

- H.264 video up to 720p, 30 frames per second,
- MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second
- Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels

We've ruled out h.264, but would either of these other two formats support alpha, to your knowledge?"


To double-check my suspicions, I just tried exporting a movie file in Quicktime Pro.
None of the codecs you list support alpha channels. Unfortunately, I fear it's time for Plan B.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Mo DeJong
Re: Is Exporting Alpha Channel in h.264 Possible?
on Jun 12, 2013 at 1:15:04 am

Matt, short answer is yes, it is possible to create a h.264 with an alpha channel for delivery on iOS.

This blog post shows how it can be done. A few things though. h.264 is a delivery codec, it should not be used as an intermediate in the video production process. Export from AE using the Quicktime Animation codec at 32 BPP (Millions+) to retain the alpha channel. Dave is correct that h.264 does not support an alpha channel by default, one needs to actually create 2 videos, one holds the RGB and the other holds the alpha pixels as a grayscale video. All the code to split the videos, convert to h.264 via ffmpeg+x264 and then recombine the videos on the iPad are already included with the AVAnimator tools. I think your will be quite impressed with the results as the generated file sizes are quite small and the .m4v files generated can be included directly to your xcode project.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]