Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Dec 2009
    Location
    chennai
    Posts
    137

    Question Getting MediaException while playing .3gp audio file

    I got the following exception
    Code:
    javax.microedition.media.MediaException: Cannot create a Player for: audio/mpeg
    In my application, I'm playing .3gp audio file. Its working well on nokia n79, n78, e63. But its not playing well on some nokia mobiles (s40 mobiles). I have tested some emulators also. But I got the MediaException. Following code i have used,

    Code:
    InputStream audioStream = getClass().getResourceAsStream("/1.3gp");
    Player player = Manager.createPlayer(audioStream, "audio/mpeg");
    player.realize();
    player.prefetch();
    player.start();
    Also Its not playing on nokia RDA devices. Why its not playing on RDA devices?
    Bharath... :)

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Getting MediaException while playing .3gp audio file

    .3ga files are audio files and .3gp files are video. You need to use a proper .3ga audio file.

    The correct content type string for .3ga files is "audio/3gpp"

    Take a look at the following article that describes the valid media Content Types for Series 40:

    http://library.developer.nokia.com/i...C97727272.html

    RDA does not support remote audio playback.

  3. #3
    Registered User
    Join Date
    Dec 2009
    Location
    chennai
    Posts
    137

    Re: Getting MediaException while playing .3gp audio file

    Thanks for your reply. I Have changed the audio file name and also changed the content type as "audio/3gpp". But same exception thrown.
    javax.microedition.media.MediaException: Cannot create a Player for: audio/3gpp
    Bharath... :)

  4. #4
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Getting MediaException while playing .3gp audio file

    Hi,

    Your .3gp file is a video file, renaming it to .3ga won't change that fact.

    Please find a proper .3ga audio file and try again, or try to extract the sound from your video .3gp file (search the net for .3gp extract audio). If you extract the audio in .wav format then you need to change the Content-Type again to "audio/wav".

    You can also try to test your code with different audio files, such as mp3 or wav files, to ensure that this is an issue related to the file you are trying to open, rather than the code.

    Please be aware of the supported audio formats for a given device:

    http://www.developer.nokia.com/Devic...pecifications/

    (look under the Multimedia tab)

  5. #5
    Registered User
    Join Date
    Dec 2009
    Location
    chennai
    Posts
    137

    Re: Getting MediaException while playing .3gp audio file

    I searched on Google for .3ga convertor. But I didn't get any convertor for this. Is there anyway to make a .3ga file? Is it play all the mobiles?
    Bharath... :)

  6. #6
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Getting MediaException while playing .3gp audio file

    You can try this software:

    http://www.riverpast.com/en/support/...rt/3gp/wav.php

    As a trial version you can extract audio up to two minutes.

    Do you really have to use the audio from the .3gp file you have, or are you just testing your code and you don't mind what audio file you are going to use? It might be easier to find other audio files for testing purposes, such as mp3s from here:
    http://www.sotone.com/mp3.htm

    .3ga is a container for audio streams such as AMR-NB, AMR-WB, AMR-WB+, AAC-LC, HE-AAC v1 or Enhanced aacPlus (HE-AAC v2). In that sense it could be less supported on mobile devices compared to .mp3 (almost all Nokia Devices released after 2006 support mp3).

  7. #7
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: Getting MediaException while playing .3gp audio file

    Hello bhakki,

    could you define which Series 40 device(s) are you using for testing this issue please?

    It could be simply that your device does not support playback of 3GP audio files. You can double checking this by using this example MIDlet for checking supported content types: http://www.developer.nokia.com/Commu...one_in_Java_ME

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

Similar Threads

  1. MediaException Error when Playing mp3 files
    By Nunu008 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2011-02-10, 20:47
  2. Playing an audio file with APS
    By etayg in forum Symbian
    Replies: 1
    Last Post: 2010-08-10, 14:51
  3. Playing audio file with APS
    By Digish in forum Symbian
    Replies: 3
    Last Post: 2009-04-23, 09:24
  4. Playing Audio file
    By Tatavarthi in forum Symbian
    Replies: 7
    Last Post: 2009-04-04, 13:37
  5. Playing Audio File
    By Kavit Patel in forum Symbian
    Replies: 10
    Last Post: 2008-01-05, 11:00

Posting Permissions

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