I have no idea. But if you change System.Drawing.Image.ImageFormat.bmp to jpeg, might you also have to change something in the ffmpeg line. I don't work with ffmpeg, but this bit "pipe:.bmp" seems like it might not apply to a jpeg stream. I don't know.