Closed bangnoise closed 4 years ago
some apps ignore the value in the sample description, but some (such as AE) heed it, so it needs to be correct
Might be this spot in ffmpeg then https://github.com/FFmpeg/FFmpeg/blob/05a61a02d628a04fa8a672ef062adf4de2ed7df6/libavformat/movenc.c#L1990 and the fix would be
videoStream_->codecpar-> bits_per_coded_sample = 32
Need to check over movenc.c carefully, make sure we're setting everything in codecpar correctly.
@GregBakker, your fix works for me. but non-alpha codecs need to stay 24bit, something like this:
+ // for alpha codec variants: Hap5 and HapM - set sample depth to 32bit instead of default 24bit
+ if (videoFormat[3] == '5' || videoFormat[3] == 'M') {
+ videoStream_->codecpar->bits_per_coded_sample = 32;
+ }
https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/hapenc.c#L257-L275
Was fixed in c2b269d8d66ec838749520ad024f21b286d891ec around 21-Feb-2019
[checks if encoder needs alpha]
Export a Hap Alpha movie. Import into AE or otherwise check the stored colour information.
The stored Sample Description (stsd) has a depth of 24 where it should be 32.
Need to check other alpha-bearing variants.