Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-16-2008, 01:59 PM
Member
 
Join Date: Apr 2008
Posts: 6
Dave Almighty is on a distinguished road
Music File Conversion
Hi there,

I'm trying to get some code going to convert a given m4a file to mp3 format using java.. I know that Java has some built-in music conversion abilities..but only for really bizarre formats like ogg and midi files..

Does anyone know of any libraries out there that supports music file conversion (specifically mp3)..

This is a small but vital part of a program I'm working on.. and it will take forever to do from scratch. Any help would be GREATLY appreciated. Thanks,

Kind regards,

David
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-17-2008, 09:34 AM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 509
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
How you also ask Google about this?

regards,
sukatoa
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 12:15 PM
Member
 
Join Date: Apr 2008
Posts: 6
Dave Almighty is on a distinguished road
Of course!
Yes, I've done searches on google ... what feels like hundreds; I've spent hours and hours trying to find a way, which is why I'm here.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 12:48 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,403
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
I'm not 100% sure, but there is two utilities for Linux called lame and faad. There is no a direct/one utility to do this conversion. Using those two it is possible.

Google it. May be the spellings of words can be wrong, if so really sorry about that.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-17-2008, 01:07 PM
Member
 
Join Date: Apr 2008
Posts: 6
Dave Almighty is on a distinguished road
Hi there, thanks for the reply.

I've checked it out, and while this is the type of thing I'm looking for, it's source files are all C, and I need to use this code in an applet, so it needs to be Java.

I think this might end up with me having to look through the byte patterns of audio files, argh. Does anyone reckon that's possible with Java... just to work out how the bytes and headers are formed in one type of file, and use plain Java to create a new file of the correct format?

I'm a novice in the area of conversion.. but that's the only way (albeit incredibly time-consuming and far from ideal) I can see around it!

Any tips or ideas are greatly appreciated, thanks.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 04-17-2008, 01:50 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,403
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
You can use read() method of the InputStream to read a single byte. But I haven't done such a thing before and I don't know how difficult it is.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 04-17-2008, 03:20 PM
Member
 
Join Date: Apr 2008
Posts: 6
Dave Almighty is on a distinguished road
It's a tricky one..

I don't suppose there's any way to run C code from a java applet? So that I could use faad and lame? I can't BELIEVE there isn't a java library to do this out there somewhere.. I can't be the first one to want to use java for this reason.

I wouldn't mind creating it from scratch if I had to; it's just impossible to find information about the exact layout of mp3/m4a files.. i.e. right down to which byte shows what in terms of header info etc.

I've never had a situation where I couldn't find a solution to a programming problem, no matter how hard I tried... and I'm determined not to let that happen!
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 04-18-2008, 04:54 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,403
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Yes, you are not the first person wants to do this. I heard about few people done this before and all of them are used faad and lame mechanism. It can tricky too, if so why are you worried about that. Even using a tricky way you can make your success. I have work out on large number of tricky events in my life.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 04-18-2008, 11:53 AM
Member
 
Join Date: Apr 2008
Posts: 6
Dave Almighty is on a distinguished road
I wasn't saying using faad and lame was tricky - that looks simple, only requires a couple of lines of code.. though its source is in C, so don't think there's a way to do this.

What's tricky is getting the very highest technical detail about these files, going laboriously through the byte sequences manually, working out all the crazy header information, etc.. for two sets of file types.. it's a lot of work, for something I would have hoped had already been worked out by an ardent music lover somewhere out there in the java community.

Will that person have to be me? I hope not.
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 04-18-2008, 11:55 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,403
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Yes, as you said working in byte level is not a good choice, because you have to do lots of works.

Are you sure that faad-lame is in C, because my friend says that his application design to work for Linux. Better to check it again me too
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 04-18-2008, 04:59 PM
Member
 
Join Date: Apr 2008
Posts: 6
Dave Almighty is on a distinguished road
Hey hey, I think I've hit the jackpot:

LAMEOnJ - The LAME symmetric Java MP3 encoder API

Looks like there's a java api for Lame (which is written in C)... this is just what I was looking for! I only managed to find it after I began researching the indepth mechanics of mp3 file structure.

I'll let you know if I get anywhere with this, Thanks.
Bookmark Post in Technorati
Reply With Quote
  #12 (permalink)  
Old 04-21-2008, 04:30 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,403
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
That's good, you found the way at the end. Try and see
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting a music file onto File geork Advanced Java 1 03-03-2008 05:34 PM
getting a music file onto File geork Advanced Java 0 02-07-2008 08:55 PM
printing MIDI notes on a music staff kbyrne Advanced Java 0 12-29-2007 08:50 PM
printing MIDI notes on a music staff kbyrne AWT / Swing 0 12-29-2007 06:30 PM
Regarding conversion of Image file to Video file RamaDeviMsc Advanced Java 0 06-25-2007 03:28 PM


All times are GMT +3. The time now is 09:52 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org