I'm looking for an application that can capture still images from a 3gp file and can be used on linux server (written in c, Java or PHP)

If there is no such thing would it be difficult to code one? Any good resources?