views:

185

answers:

3

I (or rather some of my students) have a Java ME (the platform everyone still calls J2ME) application that shows videos using JSR-135 and VideoControl. They have created mpeg-1 video files, and it works in the emulator, but not on any of the actual phones they have tried. The call to getControl in Player returns null.

I think this is because the phone can't show the video format, but the emulator can. Does that sound right?

Is there some format that they should use, in order to maximize the likelihood that various phones will be able to handle it? Yes, mpeg-1, but any specific resolution and so on?

+1  A: 

What you are looking for is the value of the video.encodings system property for a number of phones.

For example, the Nokia N95, firmware v20 says:

'encoding=video/3gpp encoding=video/3gpp2 encoding=video/mp4'

(generally, a phone is capable of both recording and playing back the same video formats)

Unfortunately, gathering this information on a large scale, with many devices is not cheap and i don't expect you will find a free online repository for this information.

If you look for the capability of a specific device, then the manufacturer's website for developers is probably where you will find the best information.

You might also want to see if www.deviceanywhere.com will give deals to educational organizations.

QuickRecipesOnSymbianOS
Ok,thanks for the reply!
Thomas Padron-McCarthy
+2  A: 

For checking video capabilities on a phone you can try using the WURFL (wurfl.sf.net). It is a MASSIVE xml file containing a map of phone browser user-agent to phone capabilities. You could try taking a sample from that to see what the most commonly supported formats are. The API itself isn't the best but for your purposes you can probably just parse out the playback_* properties from the xml.

Adam B
+1  A: 

In my experiments, I have come across different JVM's being quite finicky about the video frame rate as well as the video format. You can find out the video format using the System.getProperty("video.encodings"); as mentioned in the first answer. But for the video frame rate, I havent found any code to do that. You might be better off with a trial-and-error method. Hope this helps!

kiks