Alpha Channel in H264?

Discussion in 'Amateur Video Production' started by Flatulent Father Flannigan, Mar 3, 2009.

  1. I would like to encode an alpha channel in H264 streams. I am looking for an
    app that will provide that functionality. Any ideas?
    Flatulent Father Flannigan, Mar 3, 2009
    1. Advertisements

  2. Ken..

    I would like to ENCODE alpha data in H264 streams.

    Yes.. an alpha channel would have to be appplied prior to conversion. Assume
    I have that covered..

    So.. the question I asked was whether anyone knows of any encoders that will
    accept alpha encoded data such as ANY 32 bit image format and convert it to
    single bit or grayscale encoded alpha (transparency) as part of the H264
    encode. My application requires a transparency channel in H264 encode. None
    of my NLEs offer a solution so prior to coding our own I thought someone may
    already know of an encoder which will implement this feature of H264. I
    haven't thoroughly gone through the Quicktime Pro stuff yet.. the solution
    may be there but we shy away from QT in any of our commercial workflow..

    Of course I am not using H264 for editing source. Just curious. .. how did
    you get that from my question?

    For the record I am developing content for our hardware device which will
    have a modified H264 decoder that will extract and use the alpha channel.


    Flatulent Father Flannigan, Mar 4, 2009
    1. Advertisements

  3. Ken.. I am a compositor! TV, Features.. I know what an alpha channel is..
    I've been using them since their inception in targa files for what.. 20
    years now..

    transparency isn't a display effect. It is a method of combining two images
    with proportionate, opacity determined on a per-pixel basis. It has nothing
    to do with display or displays.
    H264 provides for an alpha channel. Most encoders don't provide an interface
    for it. I thought someone may know of a high end implementation which allows
    for that part of the spec to be implemented.

    I am a 3d Animator / Compositor / VFX supervisor. I know alpha compositing
    inside and out. It is an essential part of every comp. But I am
    implementing the alpha compositing feature in hardware and since the H264
    format allows for alpha I ought to be able to create content with that in
    mind. Problem is.. I don't see it in any of the encoder implementations here
    in Premiere, FCP, or the other apps I normally use for post. So.. I may have
    to create an app to feed an H264 encoder to provide the interface to the
    alpha part of the stream.

    I thought someone may be aware of a method. I think it is an appropriate
    question for a desktop video forum.

    But perhaps this is a matter for an alternate stream or parallel stream in
    MPEG4 or H264.

    Thanks though.

    Flatulent Father Flannigan, Mar 4, 2009
  4. maybe there is a more standard way to do this. .. at least for my
    preliminary tests with the hardware I have..

    Suppose you had to create a MPEG or H264 stream with a pair of images for
    each frame. How would you go about that?

    I was thinking that I could write an app to prepare the frame data anyway I
    want it.. for instance,

    If I was working with SD res I might make a frame sequence that was
    1440x480. The left half of the frame would be the color data and the right
    half would be a grayscale or binary image representing the alpha channel.. I
    suppose that would work fine and It would't really require any code from
    me.. given that I can encode any frame size I want to.. within limits of

    I own DVD authoring apps like Encore and DVD Studio but I never use them..

    How would you folks do that?


    Flatulent Father Flannigan, Mar 4, 2009
  5. pretty much the same thing but the source is a compact data stream from
    flash memory.

    yes.. 'overlay streams' could be used I think.. the images I am overlaying
    come from another video stream. So in the MPEG stream I need the color data
    and the transparency data on a per frame basis.

    I didn't see parts 11.14 or 15 in that doc.. I will look a little deeper
    into the spec. . .

    I wonder what apps would create those overlay streams, from my frame seqs or
    quicktimes or whatever, that we can get our hands on ?

    Thanks Ken!
    Flatulent Father Flannigan, Mar 4, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.