How to convert a black and white video to a APNG file while setting a color as transparent?
I finally found how to do that in one ffmpeg command, using colorkey:
ffmpeg  -y -i /dev/video0
           -f lavfi -i color=0x6a6a6a:s=640x480
           -f lavfi -i color=black:s=640x480
           -f lavfi -i color=white:s=640x480
           -filter_complex 'threshold,colorkey=white'
           test.apng