It is impossible to get lossless images from Motion JPEG. mjpeg inherently uses lossy jpeg compression .
However it sounds to me as if you did not tell the video writer that the frame rate should be 55/3 frames per second. (I suspect your real frame rate is either 18 or 20 fps and that 3 seconds is an approximation )
Use VideoReader (basic MATLAB) or vision.VideoFileReader (Computer Vision Toolbox) to read frame by frame from the motion JPEG file, and imwrite() each frame to a file.