You Are Here:

Community: Blogs

David Caabeiro's Forum Nokia Blog

J2ME MPEG Decoder

david.caabeiro | 16 May, 2008 22:48

From time to time switching to other less used languages is a good thing (especially when doing Symbian)

I recall having seen requests to decode MPEG streams in J2ME (without relying on any media API such as the MMAPI of course):

http://discussion.forum.nokia.com/forum/showthread.php?t=101607
http://discussion.forum.nokia.com/forum/showthread.php?t=129788

Surprisingly enough I haven't seen any decoder so far. So this little hobby project aims to provide such functionality for MIDP 2.0 devices (CLDC 1.0).

The code is self explanatory (I hope) and I set up a page for it on the Wiki: http://wiki.forum.nokia.com/index.php/J2ME_MPEG_decoder

As the text states, the main aim was providing a simple example for learning purposes. There's a lot of room for improvement and optimization and it would be really nice to see some collaboration if anyone's interested.

Even though you won't get the performance available with the MMAPI, using a software decoder has some good pros:

* You are in control of the code, which is rather lightweight (The current jar file size with no obfuscation is about 36KB)

This also means not having to deal with differences and limitations in the implementation, bugs, etc, something the MMAPI has been quite good at (limited aspects, missing events, problems with full screen videos are some of the issues I recall in the past)

* More phones available, as you don't need to rely on the MMAPI

* Being in control of the stream(s), allowing to achieve things such as picture in picture, etc.

An obvious improvement would be supporting MPEG-2 streams (H.264 / MPEG4-Part 10 would be the real achievement) and adding streaming functionality (RTP)

A rather obvious problem is that audio is not supported, yet there are many possible use cases for this project (video surveillance being one of them)

Oldest device I got with MIDP2 was a Nokia 7610, where (depending on the video) up to 5 fps was achieved.

Here's a screen capture rendering "The Wall":

MPEG Decoder screen capture

 

Enjoy.-

 

 
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZrelationQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e58E2eowlX qdcZtitleQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qdcZtitleQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qdcZtypeQUqfnZE44istributionQ qdcZtypeQUqfnZSiteQ qdcZtypeQUqvocZTermQ qdcZtypeQUqvocZVocabularyConstructQ qdcZtypeQUqwebZSiteQ qdcZtypeQUqrdfsZE52esourceQ qswZserviceQUxhttpE3aE2fE2fswE2enokiaE2ecomE2furiE71aX quriE71aZserviceQUxhttpE3aE2fE2fswE2enokiaE2ecomE2furiE71aX qvocZpartOfQUqfnZPublicationQ qwebZserviceQUxhttpE3aE2fE2fswE2enokiaE2ecomE2furiE71aX qrdfZtypeQUqfnZE44istributionQ qrdfZtypeQUqfnZSiteQ qrdfZtypeQUqvocZTermQ qrdfZtypeQUqvocZVocabularyConstructQ qrdfZtypeQUqwebZSiteQ qrdfZtypeQUqrdfsZE52esourceQ qrdfsZisE44efinedByQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e58E2eowlX qrdfsZlabelQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qrdfsZlabelQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qrdfsZseeAlsoQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e58E2eowlX