Given the inaccuracies with encoding color described in #283 and #284, and also how hard it will be to e.g. add support for encoding YUV444 videos, perhaps one thing we could do is uses ffmpeg's sws_scale to convert between pixel formats, as we already do for decoding. Input Julia buffers could be transferred into a frame that has a nearly 1:1 relationship with the Julia buffer, and then sws_scale could convert that frame into a pixel format that the encoder accepts and the user specifies.
Given the inaccuracies with encoding color described in #283 and #284, and also how hard it will be to e.g. add support for encoding YUV444 videos, perhaps one thing we could do is uses ffmpeg's sws_scale to convert between pixel formats, as we already do for decoding. Input Julia buffers could be transferred into a frame that has a nearly 1:1 relationship with the Julia buffer, and then sws_scale could convert that frame into a pixel format that the encoder accepts and the user specifies.