<p>Might be related to <a href="https://video.stackexchange.com/questions/20024">this other ticket</a>?</p>

<p>I've been doing some prores tests for both color and alpha.  Usually this isn't a big deal since my alpha channels are solid with a 1-2pixel transition to black.  However I did some tests with a very gradual change in alpha value over many pixels and noticed some pretty bad alpha channel quantization with the prores_ks encoder.  The Apple prores spec says for 4444(XQ) the alpha channel is 16bit and lossless so this is quite different from that.  I've attached a comparison image.</p>

<pre><code>ffmpeg -f image2 -framerate 24.0 -i tif/rgba_16bit.%3d.tif -filter_complex "[0]colorspace=all=bt709:range=pc:format=yuv444p12:iall='bt601-6-625':irange=pc[main];[0]alphaextract,format=gray16le[alpha];[main][alpha]alphamerge" -c:v prores_ks -profile:v 5 -pix_fmt yuva444p10le -alpha_bits 16 prores4444XQ_yuva.mov
</code></pre>

<p>Image below is actually 8bit due to imgur limitations so the 16bit and 10bit examples aren't really correct but you get the point.</p>

<p>Also it looks like <code>-alpha_bits 8</code> and <code>-alpha_bits 16</code> produce the same look so maybe its getting bad upstream?</p>

<p><a href="https://i.sstatic.net/ttHBf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ttHBf.png" alt="alpha quantization"></a></p>

CC BY-SA 4.0
2019-08-07T17:27:21.500Z
Just checked with `profile:v 4` which is regular 4444 and it still looks like that :(
Shao Zhang
<ffmpeg><prores><alpha>
ffmpeg prores alpha channel quantization looks pretty bad
Shao Zhang
# ffmpeg prores alpha channel quantization looks pretty bad

(Asked by: username_0 on 2019-08-07)

Might be related to this other ticket?
I've been doing some prores tests for both color and alpha.  Usually this isn't a big deal since my alpha channels are solid with a 1-2pixel transition to black.  However I did some tests with a very gradual change in alpha value over many pixels and noticed some pretty bad alpha channel quantization with the prores_ks encoder.  The Apple prores spec says for 4444(XQ) the alpha channel is 16bit and lossless so this is quite different from that.  I've attached a comparison image.
ffmpeg -f image2 -framerate 24.0 -i tif/rgba_16bit.%3d.tif -filter_complex "[0]colorspace=all=bt709:range=pc:format=yuv444p12:iall='bt601-6-625':irange=pc[main];[0]alphaextract,format=gray16le[alpha];[main][alpha]alphamerge" -c:v prores_ks -profile:v 5 -pix_fmt yuva444p10le -alpha_bits 16 prores4444XQ_yuva.mov

Image below is actually 8bit due to imgur limitations so the 16bit and 10bit examples aren't really correct but you get the point.
Also it looks like -alpha_bits 8 and -alpha_bits 16 produce the same look so maybe its getting bad upstream?

**Tags:** ffmpeg, prores, alpha

> **Comments:**
> **username_0**: Just checked with `profile:v 4` which is regular 4444 and it still looks like that :(  

---

## 0 answers

