m-jpeg is not one standard format. It is a group of formats that use a series of jpegs to store the frames of your video. Each implementation of this is propriotary and generally incompatible. So basically you need the codec from manufacturer of the camera (which will likely only be available for windows) and then you can use something like virtualdub to reencode it into a standard format.
ffmpeg won't use windows codecs so is not the ideal tool to use in this case.
I would highly recommend against converting to an mpg and then to an flv as reencoding twice incurs a big loss in quality over recoding directly. If you need to do it in 2 steps then the intermediate format should be uncompressed or a lossless format such as huffyuv.