I had this question answered that helped me merge two mp4 videos with alphamerge with the following command to an .mov file
ffmpeg -i video.mp4 -i mask.mp4 -filter_complex "[1][0]scale2ref[mask][main];[main][mask]alphamerge" -c:v qtrle output.mov
Now, I was wondering how I would change this for the output of a gif. When I tried
ffmpeg -i word.mp4 -i word.matte.mp4 -filter_complex "[1][0]scale2ref[mask][main];[main][mask]alphamerge" -c:v qtrle output.gif
I got this error
[swscaler @ 0x5601daaa4d40] No accelerated colorspace conversion found from yuv420p to argb.
[gif @ 0x5601d9ad2d00] GIF muxer supports only a single video GIF stream.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
I'm using ffmpeg 4.2.4