0

Trying a simple overlay example, getting nasty black fringes:

fmpeg -y -i b.png -i a.png -filter_complex "[0:v]format=rgba[a];
    [1:v]format=rgba[b];
    [a][b]overlay,format=rgba"  normal.png

b a result expected

Expected over Result zoomed in 😱 expected vs result

8
  • 1
    Open a ticket at trac.ffmpeg.org. Run your command with -v verbose added and capture log. Share full command and log there..
    – Gyan
    Mar 10, 2020 at 8:27
  • Thanks, Gyan, trac.ffmpeg.org/ticket/8563
    – QPM
    Mar 10, 2020 at 16:34
  • Workaround: ffmpeg -y -i b.png -i a.png -filter_complex "[0:v]format=rgba[a]; [1:v]format=rgba[b]; [a][b]overlay=format=auto" normal.png
    – llogan
    Mar 10, 2020 at 17:35
  • @llogan add it as the answer. Explained at trac.
    – Gyan
    Mar 10, 2020 at 19:57
  • @Gyan Added. Would be nice if auto was the default.
    – llogan
    Mar 10, 2020 at 20:53

1 Answer 1

2

Default pixel format for overlay filter is yuv420p. Use the format option in overlay to set it as auto or rgb.

ffmpeg -y -i b.png -i a.png -filter_complex "[0:v]format=rgba[a]; [1:v]format=rgba[b]; [a][b]overlay=format=auto" normal.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.