1
I'm using code similiar to this to pipe OpenGL image data directly to ffmpeg. I'm using this readpixels call:
qglReadPixels( 0, 0, glConfig.vidWidth, glConfig.vidHeight, GL_RGB, GL_UNSIGNED_BYTE, 0 );
however I have to use GL_RGB instead of GL_RGBA. In the ffmpeg command line I change RGBA to RGB24 accordingly. However, the output videos color channels are messed up (red is swapped with green). I can't seem to find any color formats that are GRB, so is there some way to swap red and green channels in ffmpeg using colorchannelmixer
?
edit: this would involve setting RR to 0, RG to 1, GG to 0, GR to 1? What would the syntax for that be?
Thanks.