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

  • 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 at 8:27
  • Thanks, Gyan, trac.ffmpeg.org/ticket/8563 – QPM Mar 10 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 at 17:35
  • @llogan add it as the answer. Explained at trac. – Gyan Mar 10 at 19:57
  • @Gyan Added. Would be nice if auto was the default. – llogan Mar 10 at 20:53
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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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