Skip to main content

Problems playing video/mpeg

4 replies [Last post]
ainhoa
Offline
Joined: 2010-02-09
Points: 0

Hi,
I am trying to develop a midlet using J2ME MMAPI to display video from a jar file.

InputStream is = getClass().getResourceAsStream("/"+url);
player = Manager.createPlayer(is, "video/mpeg");
...

The midlet works fine in the emulator java sdk 3.0, but not in the device when I runit from phoneMe Manager. I can´t see the video. I have checked that device supports mpeg/video with Manager.getSupportedContentTypes("file");
I´ve seen that in the device player.getContentType() returns application/octet-stream and not "video/mpeg", so that returns null when I try to create videocontrol: VideoControl video = (VideoControl) player.getControl("javax.microedition.media.control.Vid eoControl");

I thought the device didn´t have the codecs installed. However I can see the video with windows media player and tpcmp player. I have tried to install codecs for wm6 but it doesn´t work.
Any help?
thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
davyp
Offline
Joined: 2007-01-03
Points: 0

Hi,

If you are using the builds from my website, then indeed, video and recording won't work.
My builds only support wav files and single track midi files and use standardized APIs that are
available on most WinCE devices (including non-Windows Mobile variants). My builds would
support more formats if I would use the DirectShow APIs, but they are not available on all
devices. Also, I don't know of an open source media player implementation that could be
reused and integrated. So I am afraid everything needs to be written from scratch for the
WinCE/Windows Mobile platform.

Davy

ainhoa
Offline
Joined: 2010-02-09
Points: 0

Hi,
Thank you for your replay.
I have a doubt, if is not video supported, do you know why does getSupportedContentTypes return "video/meg"?

Then, I have to make a new build of phoneme feature using the DirectShow Api?

Thanks again

davyp
Offline
Joined: 2007-01-03
Points: 0

The "video/mpeg" mime type is probably my fault. I included in the set of supported
mime types while I was developing some of the APIs and backends. At this point
I return a dummy player (that returns application/octet-stream as supported content
type) which cannot play anything. It is probably better if I leave out both audio/mpeg
and video/mpeg as they both don't work the way they should.

On my own device, I use an external media player without gui to play some audio
types, but it is pretty hard to gain fine grained control over the playback functions
(pause, loop, etc). I did not include it as it uses APIs that only work on Windows Mobile
6. The Windows Mobile 6 SDK also has some command line media players that use
Direct Show. The playback functionality would definitely be much better but I just have
not had the time to see if I can integrate it into the phoneME VM.

Davy

ainhoa
Offline
Joined: 2010-02-09
Points: 0

Thank you!