×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    9

    MP4 Playback on N93

    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

  2. #2
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    307

    Re: MP4 Playback on N93

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

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    44

    Re: MP4 Playback on N93

    have you tried to play some other type of media like 3gpp ?

    Appears to be a phone problem more than of j2me.


    regards
    nimish

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    9

    Re: MP4 Playback on N93

    I have tried using 3gp but wasn't happy with the quality (especially the audio quality was very poor).

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    44

    Re: MP4 Playback on N93

    Then it appears the file created is not of the correct format. You should try to create the MP4 file using some other software.

Similar Threads

  1. MP4 video playback problem with N70...
    By Mattloaf in forum Streaming and Video
    Replies: 9
    Last Post: 2010-05-05, 16:09
  2. MP4 video on the Nokia N93
    By Pepperami in forum Streaming and Video
    Replies: 0
    Last Post: 2007-01-21, 23:47
  3. mpeg-4 h.264 avc not available on n93
    By gphilpott in forum Streaming and Video
    Replies: 2
    Last Post: 2006-10-19, 01:17
  4. playback 3gp or mp4 video
    By joppie_tjoa in forum Mobile Java General
    Replies: 3
    Last Post: 2006-03-10, 04:41

Posting Permissions

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