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.-

 

RSSComments

You must login to post comments. Login
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZdescriptionQSxThoughtsE20onE20newE20mobileE20technologiesE20andE20developmentE20areasE2eE20PE2eSE2eE20UseE20NokiaE20barcodeE20readerE20toE20readE20theE20codeE20E3bE2dE29E20jack44E20E7cE2003E20E44ecemberE2cE202007E2014E3a42E20TodayE2cE20aE20finalE20versionE20ofE20NetBeansE20MobilityE20IE44E45E206E2e0E20hasE20beenE20releasedE2eE20FeaturesE20worthE20mentioningE20areE3aimprovedE20VisualE20MobileE20E44esignerE20E28withE20versionE202E20ofE20theE20VME44E20youE20canE3aE20dragE20andE20dropE20componentsE20likeE20waitE20screensE2cE20loginE20screensE2cE20fileE20browsersE2cE20SMSE20composerE2cE20andE20splashE20screensE20ontoE20aE20canvasE3bE20theE20VME44E20alsoE20makesE20GUIE20localizationE20easierE29mobileE20GameE20BuilderE20E28wiE2eE2eE2eX qdcZidentifierQSxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fblogE2fjacekE2dwojciechowskisE2dforumE2dnokiaE2dblogE2f2007E2f12E2f03E2fgoodE2dnewsE2dforE2djavaE2dmeE2ddevelopersE2eE2eE2eE2dnetbeansE2dmobilityE2d6E2e0E2dwtkE2d2E2e5E2e2X qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX qdcZtitleQSxJacekE20WojciechowskiE27sE20ForumE20NokiaE20BlogE20E7cE20GoodE20newsE20forE20JavaE20ME45E20developersE2eE2eE2eE20NetBeansE20MobilityE206E2e0E2cE20WTKE202E2e5E2e2X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfnTypeZBlogContentQ qdcZtypeQUqfnTypeZBlogE45ntryQ qdcZtypeQUqfnTypeZCommunityContentQ qdcZtypeQUqfnTypeZE52esourceQ qdcZtypeQUqfnTypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qrssZdescriptionQSxThoughtsE20onE20newE20mobileE20technologiesE20andE20developmentE20areasE2eE20PE2eSE2eE20UseE20NokiaE20barcodeE20readerE20toE20readE20theE20codeE20E3bE2dE29E20jack44E20E7cE2003E20E44ecemberE2cE202007E2014E3a42E20TodayE2cE20aE20finalE20versionE20ofE20NetBeansE20MobilityE20IE44E45E206E2e0E20hasE20beenE20releasedE2eE20FeaturesE20worthE20mentioningE20areE3aimprovedE20VisualE20MobileE20E44esignerE20E28withE20versionE202E20ofE20theE20VME44E20youE20canE3aE20dragE20andE20dropE20componentsE20likeE20waitE20screensE2cE20loginE20screensE2cE20fileE20browsersE2cE20SMSE20composerE2cE20andE20splashE20screensE20ontoE20aE20canvasE3bE20theE20VME44E20alsoE20makesE20GUIE20localizationE20easierE29mobileE20GameE20BuilderE20E28wiE2eE2eE2eX qfnZdistributionQUxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fX qfnZtopicQUqfnTopicZjavaQRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtypeQUqfnTypeZBlogContentQ qfnZtypeQUqfnTypeZBlogE45ntryQ qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZE52esourceQ qfnZtypeQUqfnTypeZWebpageQ qfnZupdatedQDx2007E2d12E2d03X qfnZuserE5ftagQSxjavaX qmarsZdescriptionQSxThoughtsE20onE20newE20mobileE20technologiesE20andE20developmentE20areasE2eE20PE2eSE2eE20UseE20NokiaE20barcodeE20readerE20toE20readE20theE20codeE20E3bE2dE29E20jack44E20E7cE2003E20E44ecemberE2cE202007E2014E3a42E20TodayE2cE20aE20finalE20versionE20ofE20NetBeansE20MobilityE20IE44E45E206E2e0E20hasE20beenE20releasedE2eE20FeaturesE20worthE20mentioningE20areE3aimprovedE20VisualE20MobileE20E44esignerE20E28withE20versionE202E20ofE20theE20VME44E20youE20canE3aE20dragE20andE20dropE20componentsE20likeE20waitE20screensE2cE20loginE20screensE2cE20fileE20browsersE2cE20SMSE20composerE2cE20andE20splashE20screensE20ontoE20aE20canvasE3bE20theE20VME44E20alsoE20makesE20GUIE20localizationE20easierE29mobileE20GameE20BuilderE20E28wiE2eE2eE2eX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfnTypeZBlogContentQ qrdfZtypeQUqfnTypeZBlogE45ntryQ qrdfZtypeQUqfnTypeZCommunityContentQ qrdfZtypeQUqfnTypeZE52esourceQ qrdfZtypeQUqfnTypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ