Opened 5 years ago
Last modified 5 years ago
#6718 reopened enhancement
Option to remove label on alpha channel
|Reported by:||ttdww||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
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 (19)
comment:1 by , 5 years ago
|Keywords:||label interpret removed|
|Priority:||important → wish|
|Type:||task → enhancement|
comment:2 by , 5 years ago
comment:3 by , 5 years ago
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 by , 5 years ago
Ok, that only affects the input. The output file still have alpha labeled as 'straight'.
comment:5 by , 5 years ago
Will the change affect the png encoder or the mov muxer?
comment:6 by , 5 years ago
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.
follow-up: 9 comment:7 by , 5 years ago
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.
comment:8 by , 5 years ago
Was that a question for me?
comment:9 by , 5 years ago
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 by , 5 years ago
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.
comment:11 by , 5 years ago
Please provide short (!) files with ignored, straight and premultiplied alpha (identical except for the alpha label).
comment:12 by , 5 years ago
Will do. Thanks very much.
comment:13 by , 5 years ago
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.
comment:14 by , 5 years ago
|Status:||new → closed|
File is gone.
by , 5 years ago
by , 5 years ago
by , 5 years ago
by , 5 years ago
comment:15 by , 5 years ago
|Status:||closed → reopened|
Files are attached now.
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.