Opened 2 months ago

Last modified 5 weeks ago

#6718 new enhancement

Option to remove label on alpha channel

Reported by: ttdww Owned by:
Priority: wish Component: undetermined
Version: unspecified Keywords: alpha
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

When FFMPEG writes to RGBA PNG 32bit .MOV Quicktime, it seems to label alpha to be interpreted as 'straight' when we need the files to have 'no label' so After effects can remember it's own interpretation setting for 'Import of an unlabeled alpha'. Otherwise users will constantly have to force the interpretation of every FFMPEG created PNG file they import regardless of what After Effects is set to.

Version of FFMPEG: ffmpeg-20170921-183fd30-win64-static

How to reproduce:
ffmpeg.exe -r 24 -f image2 "explosion.%%04d.exr" -vcodec png -pix_fmt rgba -y "explosion.mov"

If we are doing something wrong, we apologize. We have searched far and wide for an answer.

Change History (13)

comment:1 Changed 2 months ago by cehoyos

  • Keywords label interpret removed
  • Priority changed from important to wish
  • Type changed from task to enhancement

comment:2 Changed 2 months ago by ttdww

Hi Cehoyos,

Since I see this was changed from bug to wish, I'm guessing there is no way to control this currently?

From other programs we've used here, 3ds max, After Effects, etc., the alpha channel of most QT files outputted is always 'unlabeled', so we're hoping this can be added to FFMPEG soon. For now, we're going to have to keep command-line AE in our workflow to process files.

Thanks again for your time.

comment:3 Changed 2 months ago by ttdww

I'm seeing something in the docs about -vf unpremultiply (http://ffmpeg.org/ffmpeg-filters.html#toc-unpremultiply) though I'm not clear on how to use it with switches.

Perhaps an example would help us. Thanks!

comment:4 Changed 2 months ago by ttdww

Ok, that only affects the input. The output file still have alpha labeled as 'straight'.

comment:5 Changed 2 months ago by cehoyos

Will the change affect the png encoder or the mov muxer?

comment:6 Changed 2 months ago by ttdww

I'm thinking the mov muxer overall? Or even beyond that, it could affect any filetype that supports outputted alpha (Quicktime PNG, QT Animation, EXR, TGA..). However the primary issue for us, currently, is to have it work with PNG RGBA.

[Edit] I realize now I may have misunderstood your question. If you are asking me if it will affect either one of those or both, I'm not sure.

Last edited 2 months ago by ttdww (previous) (diff)

comment:7 follow-up: Changed 2 months ago by ttdww

From what I'm understanding, some filetypes (not sure which ones, but definitely Quicktime PNG 32bit) can get a property or metadata string added to the file which defines how the alpha should be interpreted. Most programs I've seen that output PNG don't add one so that the image editing app importing it can force it to it's own setting per that app. Somehow when FFMPEG is writing it, it seems it's getting that property added and set to 'straight'. This is my best guess, however I'm not a coder.

Last edited 2 months ago by ttdww (previous) (diff)

comment:8 Changed 2 months ago by ttdww

Hi,

Was that a question for me?

comment:9 in reply to: ↑ 7 Changed 6 weeks ago by cehoyos

Replying to ttdww:

From what I'm understanding, some filetypes (not sure which ones, but definitely Quicktime PNG 32bit) can get a property

My question was (if you know) if the property - that you originally called a label - is part of the mov file or the png images inside. It is unlikely that it is a property of both.

comment:10 Changed 6 weeks ago by ttdww

So sorry, I'm not sure. I'm just a graphics artist and CEO but not so much a coder.

I only know that when a program (in this case FFmpeg) writes a Quicktime file from a string of 32bit images (.EXR, .TGA, or .PNG in this case), the alpha channel in the input image string may be labeled or unlabeled (as to how to use the alpha) and then can be labeled or set to unlabeled when a Quicktime file is written. There needs to be an option when writing the QT file (in this case a 32bit PNG) to leave the alpha 'unlabeled'. Currently FFmpeg sets the alpha in the QT file to 'straight' which many companies don't use when compositing for movies, games, TV, etc - or at least they need it to be 'unlabeled'.

The problem is that when a company like ours supplies them with hundreds of QT files, after the import of the first QT file, as long as the alpha is unlabeled they can choose the method they want: 'ignore alpha, straight, or premultiplied'. Then the rest of the QT files will grab that default as they import. If the alpha is already labeled (in the case of how FFmpeg currently writes them, it forces it to 'straight'), then the client will have to manually set each and every QT file to their preference, hence making the QT files not very usable.

Thanks again! Sorry, hope all that makes sense. We're really hoping to ditch After Effects command-line processing and solely use FFmpeg if we could just get this resolved.

Last edited 6 weeks ago by ttdww (previous) (diff)

comment:11 Changed 6 weeks ago by cehoyos

Please provide short (!) files with ignored, straight and premultiplied alpha (identical except for the alpha label).

comment:12 Changed 6 weeks ago by ttdww

Will do. Thanks very much.

comment:13 Changed 5 weeks ago by ttdww

Here you go: http://finalight.com/download/x3a4j5hv2x34x5hf4j6g5x8w34kjbv34z/mov_tests_withAlpha.zip

I wasn't sure how to create a 32bit .mov with alpha ignored but while still retaining the alpha in the file, so I went ahead with it set to ignored which outputs only RGB with no alpha; then included the alpha as a separate 8bit .mov.

Let me know if this isn't what you need.

Thanks again!

Note: See TracTickets for help on using tickets.