Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    5
    Rep Power
    0

    Default problem in playing mp3 on webpage which was recorded as wav and converted into mp3

    Hi all,

    I have recorded sound using my program. It uses classes like AudioSystem. And it's able to record and play also. but in my site I have an mp3 player. So i thought of converting the recorded wav file into mp3. For this i used LAME utility in Linux. And it was converted. Also it is being played in normal players like Winamp. But when i try to play this converted mp3 file using my player in my site it's having problem. Why is it like that?

    Should i do something while capturing the sound from microphone so that it can be converted into mp3 format??
    Or
    Can I directly capture voice to an mp3 file??

    In my program,

    targetDataLine.open(audioFormat) where audioFormat is like

    float sampleRate = 8000.0F;
    int sampleSizeInBits = 16;
    int channels = 1;
    boolean signed = true;
    boolean bigEndian = false;

    Should I do something more or change something??

    Please help me...:o

    Thanx and Regards,
    sand...

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    You can not play mp3 files with standard java api. You should use third party libraries to play them. And there is nothing wrong to convert wav to mp3 with LAME. I guess your problem is that mp3 is not supported in the way you used to play sound files.

  3. #3
    Join Date
    Oct 2007
    Posts
    5
    Rep Power
    0

    Default

    thanks a lot for your reply...
    I have got the problem solved. While converting the wav file into MP3
    I re sampled it with frequency-44.1. And it's playing now.
    I am playing it not using java sound API but JW MP3 player.

    thanx and regards,
    sand...

  4. #4
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    Ok. Thanks for informing us. Happy to hear your problem solved.

Similar Threads

  1. Secure Webpage for Logins
    By chandpuri in forum Advanced Java
    Replies: 3
    Last Post: 09-22-2009, 06:42 PM
  2. Replies: 4
    Last Post: 03-25-2008, 01:16 PM
  3. post info to a webpage
    By kmp in forum Networking
    Replies: 1
    Last Post: 03-22-2008, 03:20 AM
  4. Re-playing sound
    By JSK in forum CLDC and MIDP
    Replies: 0
    Last Post: 02-06-2008, 12:34 PM
  5. Replies: 0
    Last Post: 07-10-2007, 10:13 PM

Posting Permissions

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