×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    1

    Playing video on N95 using J2me

    I am trying to develop a demo using J2ME to display video from local file on N95.
    I used exsting demo on Netbeans and it's working very good.
    When I tried to run the same demo on S60 3rd ed. FP1 emulator, it could not create the player.

    I am running:
    System.out.println("Platform is: " + System.getProperty("microedition.platform"));


    String mediaVersion = System.getProperty("microedition.media.version ");
    System.out.println("Media version is : "+mediaVersion);

    String videoEncoding = System.getProperty("video.encodings ");
    //for (int i = 0 ; i < videoEncoding.length; i++)
    System.out.println("Video Encoding is: "+videoEncoding);


    String[] protocols = Manager.getSupportedProtocols(null);
    for (int i=0; i < protocols.length; i++) {
    String[] contents = Manager.getSupportedContentTypes(protocols[i]);
    for (int j = 0 ; j < contents.length; j++) {
    System.out.println("Support prtocol:"+ protocols[i]+ " content = " + contents[j]);
    }
    }
    I am getting:
    Platform is: Nokia3250/S60_3_1_200640
    Media version is : null
    Video Encoding is: null
    Support prtocol:device content = audio/midi
    Support prtocol:device content = audio/rmf
    Support prtocol:device content = audio/sp-midi
    Support prtocol:device content = audio/mobile-xmf
    Support prtocol:device content = audio/x-beatnik-rmf
    Support prtocol:device content = audio/x-rmf
    Support prtocol:device content = audio/x-tone-seq
    Support prtocol:http content = audio/mp3
    Support prtocol:http content = audio/wav
    Support prtocol:http content = audio/x-wav
    Support prtocol:http content = audio/basic
    Support prtocol:http content = audio/x-au
    Support prtocol:http content = audio/au
    Support prtocol:http content = audio/x-basic
    Support prtocol:http content = audio/midi
    Support prtocol:http content = audio/rmf
    Support prtocol:http content = audio/sp-midi
    Support prtocol:http content = audio/mobile-xmf
    Support prtocol:http content = audio/x-beatnik-rmf
    Support prtocol:http content = audio/x-rmf
    Support prtocol:http content = audio/3gpp
    Support prtocol:http content = audio/mp4
    Support prtocol:http content = audio/3gpp2
    Support prtocol:http content = audio/3gpp
    Support prtocol:http content = audio/aac
    Support prtocol:http content = audio/mpeg
    Support prtocol:http content = audio/amr
    Support prtocol:http content = audio/amr-wb
    Support prtocol:http content = audio/qcelp
    Support prtocol:http content = text/plain
    Support prtocol:http content = audio/x-ms-wma
    Support prtocol:http content = image/gif
    Support prtocol:http content = audio/x-tone-seq
    Support prtocol:https content = audio/mp3
    Support prtocol:https content = audio/wav
    Support prtocol:https content = audio/x-wav
    Support prtocol:https content = audio/basic
    Support prtocol:https content = audio/x-au
    Support prtocol:https content = audio/au
    Support prtocol:https content = audio/x-basic
    Support prtocol:https content = audio/midi
    Support prtocol:https content = audio/rmf
    Support prtocol:https content = audio/sp-midi
    Support prtocol:https content = audio/mobile-xmf
    Support prtocol:https content = audio/x-beatnik-rmf
    Support prtocol:https content = audio/x-rmf
    Support prtocol:https content = audio/3gpp
    Support prtocol:https content = audio/mp4
    Support prtocol:https content = audio/3gpp2
    Support prtocol:https content = audio/3gpp
    Support prtocol:https content = audio/aac
    Support prtocol:https content = audio/mpeg
    Support prtocol:https content = audio/amr
    Support prtocol:https content = audio/amr-wb
    Support prtocol:https content = audio/qcelp
    Support prtocol:https content = text/plain
    Support prtocol:https content = audio/x-ms-wma
    Support prtocol:https content = image/gif
    Support prtocol:https content = audio/x-tone-seq
    Support prtocol:file content = audio/mp3
    Support prtocol:file content = audio/wav
    Support prtocol:file content = audio/x-wav
    Support prtocol:file content = audio/basic
    Support prtocol:file content = audio/x-au
    Support prtocol:file content = audio/au
    Support prtocol:file content = audio/x-basic
    Support prtocol:file content = audio/midi
    Support prtocol:file content = audio/rmf
    Support prtocol:file content = audio/sp-midi
    Support prtocol:file content = audio/mobile-xmf
    Support prtocol:file content = audio/x-beatnik-rmf
    Support prtocol:file content = audio/x-rmf
    Support prtocol:file content = audio/3gpp
    Support prtocol:file content = audio/mp4
    Support prtocol:file content = audio/3gpp2
    Support prtocol:file content = audio/3gpp
    Support prtocol:file content = audio/aac
    Support prtocol:file content = audio/mpeg
    Support prtocol:file content = audio/amr
    Support prtocol:file content = audio/amr-wb
    Support prtocol:file content = audio/qcelp
    Support prtocol:file content = text/plain
    Support prtocol:file content = audio/x-ms-wma
    Support prtocol:file content = image/gif
    Support prtocol:file content = audio/x-tone-seq
    Support prtocol:capture content = audio/wav
    Support prtocol:capture content = audio/x-wav
    Support prtocol:capture content = audio/basic
    Support prtocol:capture content = audio/x-au
    Support prtocol:capture content = audio/au
    Support prtocol:capture content = audio/x-basic
    Support prtocol:capture content = audio/amr
    Support prtocol:capture content = audio/qcelp
    Support prtocol:capture content = audio/mp4
    Support prtocol:file content = audio/mp3
    Support prtocol:file content = audio/wav
    Support prtocol:file content = audio/x-wav
    Support prtocol:file content = audio/basic
    Support prtocol:file content = audio/x-au
    Support prtocol:file content = audio/au
    Support prtocol:file content = audio/x-basic
    Support prtocol:file content = audio/midi
    Support prtocol:file content = audio/rmf
    Support prtocol:file content = audio/sp-midi
    Support prtocol:file content = audio/mobile-xmf
    Support prtocol:file content = audio/x-beatnik-rmf
    Support prtocol:file content = audio/x-rmf
    Support prtocol:file content = audio/3gpp
    Support prtocol:file content = audio/mp4
    Support prtocol:file content = audio/3gpp2
    Support prtocol:file content = audio/3gpp
    Support prtocol:file content = audio/aac
    Support prtocol:file content = audio/mpeg
    Support prtocol:file content = audio/amr
    Support prtocol:file content = audio/amr-wb
    Support prtocol:file content = audio/qcelp
    Support prtocol:file content = text/plain
    Support prtocol:file content = audio/x-ms-wma
    Support prtocol:file content = image/gif
    Support prtocol:file content = audio/x-tone-seq


    Is it possible that JSR-135 is not supported?
    Can you advice how can I use the JSR-135 on N95?

    Thank you

    Ehud Moradoff
    CTO DigitalFootsteps

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    8

    Re: Playing video on N95 using J2me

    Hi,

    Can you please share the demo what you are referring to in the Netbeans?
    I am really having a tough time to play MP4 file on N95.
    Its not giving any exception but not playing the video file.

    Here i the piece of the code...

    try
    {
    inputStream = getClass().getResourceAsStream("/TEST.mp4");// To play 3gp file from jar file

    Player player = Manager.createPlayer(inputStream, "video/MPEG4"); // even i tried MPEG-4
    player.addPlayerListener(this);

    player.prefetch();
    player.realize();

    VideoControl vc;
    if ((vc = (VideoControl)player.getControl("VideoControl")) != null) {
    vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this);
    vc.setDisplayLocation(40,70);
    vc.setVisible(true);
    }
    player.start();

    }catch(Exception e){
    }

    Many thanks in advance and appreciate q quick reply as i am running out of time for my demo..

    ~Surya~

  3. #3
    Registered User
    Join Date
    Apr 2007
    Location
    Hyderabad
    Posts
    21

    Re: Playing video on N95 using J2me

    Hi Surya,
    I guess u need to get the content types by following the above code and see the exact mime type to be passed. First try with any 3gp file give vide0/3ggp2 and work with that. Dont rely on emulators check with device .


    Regards
    Srinivas

  4. #4
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    76

    Re: Playing video on N95 using J2me

    Hi
    I have been trying to play audio (.mp3 or .wav) on N95 using Java ME. The audio file is on my local computer drive, and gets transferred to the cellphone as part of the jar application.

    I have been trying the codes mentioned here:
    http://developers.sun.com/mobility/m...mmapioverview/
    http://wiki.forum.nokia.com/index.ph..._using_JSR_135

    The code is not giving any kind of error/exception, even the whole code gets executed in N95, but the audio is never played

    I have tried the same code on a Windows mobile, and the audio .mp3 file is playing.

    I have even checked (using Manager.getSupportedContentTypes() and Manager.getSupportedProtocols()) that N95 supports both the audio formats.

    Please help.
    Thanks

  5. #5
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    76

    Re: Playing video on N95 using J2me

    It's working. Got this solution in another thread:
    1. Go to "Settings"
    2. Select "Profiles"
    3. Select "General" or the profile you are using
    4. Select "Personalise"
    5. Set "Warning Tones" to "On"

Similar Threads

  1. N95 problem with local video file playback
    By dermicha in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2007-07-23, 17:11
  2. MMAPI playing video in N70
    By kennis_yip in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-02-17, 09:31

Posting Permissions

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