You Are Here:

Community: Developer Discussion Boards

#1 Old MP4 Playback on N93 - 2007-09-05, 08:27

Join Date: Aug 2005
Posts: 9
DarthSteff
Offline
Registered User
Hi everybody!

I'm trying to play an mp4 file in a mobile app on my N93. The video is displayed correctly but there is no audio at all. If I play the file in Real Player everything works fine.
I moved the file out of the archive as I was getting a prefetch error (-4). Now I am streaming it from the memory card. The mp4 file is about 2 megabytes in size - I created it using the imtoo mp4 converter.
Below is the code I use to start the playback. Sorry for using the absolute file path, but this is an application that needs to run only once on that particular phone so there is no need any fancy file logic. I tried getting the VolumeControl and setting it to 100 but that didn't cause any changes. The audio is still not there :-|

try {
FileConnection conn = (FileConnection) Connector.open("file:///E:/myfile.mp4");
Player player = Manager.createPlayer(conn.openInputStream(), "video/mp4");
player.realize();
player.prefetch();

VideoControl control = (VideoControl) player.getControl("VideoControl");
if (control != null) {
control.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, mediaScreen);
control.setDisplayLocation(0,0);
control.setDisplayFullScreen(true);
control.setVisible(true);
player.start();
}
} catch (IOException e) {
e.printStackTrace();
} catch (MediaException e) {
e.printStackTrace();
}

Best regards,

Steff
Reply With Quote

#2 Old Re: MP4 Playback on N93 - 2007-09-06, 11:37

Join Date: Aug 2006
Posts: 307
axs
Offline
Regular Contributor
Sometimes it's rather a better solution if you specify media location directly into the Manager.createPlayer(). The reason is quite simple: it does a lot of things automatically, so you shouldn't care about MIME types.

Player prefetching in most cases is done automatically, even if you call start() method just after the player creation. This is all because of the Player's state model.

Also you probably should note, that if mobile phone's native software is supporting some media types, it is not always guaranteed that the mobile java would be able to do the same things (altrough it is using the same Real Player engine).
Reply With Quote

#3 Old Re: MP4 Playback on N93 - 2007-09-06, 14:23

Join Date: Aug 2005
Posts: 44
nimishjain15882
Offline
Registered User
have you tried to play some other type of media like 3gpp ?

Appears to be a phone problem more than of j2me.


regards
nimish
Reply With Quote

#4 Old Re: MP4 Playback on N93 - 2007-09-06, 23:42

Join Date: Aug 2005
Posts: 9
DarthSteff
Offline
Registered User
I have tried using 3gp but wasn't happy with the quality (especially the audio quality was very poor).
Reply With Quote

#5 Old Re: MP4 Playback on N93 - 2007-09-07, 07:06

Join Date: Aug 2005
Posts: 44
nimishjain15882
Offline
Registered User
Then it appears the file created is not of the correct format. You should try to create the MP4 file using some other software.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
MP4 video playback problem with N70... Mattloaf Streaming and Video 8 2007-03-29 11:50
MP4 video on the Nokia N93 Pepperami Streaming and Video 0 2007-01-22 00:47
mpeg-4 h.264 avc not available on n93 gphilpott Streaming and Video 2 2006-10-19 02:17
playback 3gp or mp4 video joppie_tjoa Mobile Java General 3 2006-03-10 05:41

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: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ