Hello.
Motion JPEG (M-JPEG or MJPEG) is a video compression format in which each video frame or interlaced field of a digital video sequence is compressed separately as a JPEG image.
YUY2 Video Picture Encoding. Description. A digital, color-difference component video picture format identified by the FOURCC code YUY2. This format employs 4:2:2 chroma subsampling with each sample represented by 8 bits of data.
So, the difference is that The MJPEG codec uses more compression, resulting in a higher frame rate and a lower quality image. The YUY2 uses less compression, resulting in a higher quality image and a lower frame rate.