Also, your terminology is not clear. .mp2 and .mp3 generally refer to the audio-only parts of the mpeg-1/2 standard (they are short for "mpeg-1, audio layer II/III"), usually when taken separately from the video, while .mpg usually refers to the container file that holds both audio and video together, with the video being in encoded in mpeg1 or (more likely these days) mpeg2.
However, there's also the newer mpeg-4 standard, which many camcorders encode to. Unlike the above, .mp4
generally refers to the container format used, which means they are usually combined audio/video files, although they can be audio-only as well. The video inside .mp4 files is usually some form of h.264 codec, and the audio is probably .aac.
So it would help to know exactly what type of media you're referring to. The cli (or file info) output of your media player should be able to tell you what the parameters of the file are. If you have ffmpeg, for example, try using "ffmpeg -i filename" and show us the "input" part of the printout.