This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

WAV files to MP3 and MP3 to WAV  RSS feed

 
Ranch Hand
Posts: 1605
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I need to find a working example in Java that converts from WAV to MP3 and the other direction too, from MP3 to WAV files.

Has anyone done this and can point me to some code examples?

Please advise.

Thanks!

-- mike
 
Bartender
Posts: 19980
95
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I do that sort of work via OS utilities. Linux is very good at stuff like that.

If you absolutely have to do it in Java, at a rough guess you should be able to open the stream in one format, pull the audio bits into RAM, then write them to an output stream in the other format. It's been a while since I worked with the multi-media component of Java, but I'm fairly certain that's possible. Especially since I know that projectx, which is an absolutely screaming video processor app is written in Java.
 
Mike London
Ranch Hand
Posts: 1605
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:Actually, I do that sort of work via OS utilities. Linux is very good at stuff like that.

If you absolutely have to do it in Java, at a rough guess you should be able to open the stream in one format, pull the audio bits into RAM, then write them to an output stream in the other format. It's been a while since I worked with the multi-media component of Java, but I'm fairly certain that's possible. Especially since I know that projectx, which is an absolutely screaming video processor app is written in Java.



Interesting. I'm on a mac so I'll look into those utilities.

Thanks,

- mike
 
Tim Holloway
Bartender
Posts: 19980
95
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One caveat. Critical patents on MP3 were held by the Frauenhofer Institute. The Institute was willing to accomodate open-source use, but some of the key players (notably Red Hat) have a very strict non-encumbrance policy that for years meant that you had to install some of the MP3 stuff out-of-band. Those patents have expired now, but there may be residual effects.

Of course on Apple distributions, you have to deal with Apple's unique mindset, which may or may not have determined that MP3 format is good enough for them to include in the standard kit.
 
Mike London
Ranch Hand
Posts: 1605
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:One caveat. Critical patents on MP3 were held by the Frauenhofer Institute. The Institute was willing to accomodate open-source use, but some of the key players (notably Red Hat) have a very strict non-encumbrance policy that for years meant that you had to install some of the MP3 stuff out-of-band. Those patents have expired now, but there may be residual effects.

Of course on Apple distributions, you have to deal with Apple's unique mindset, which may or may not have determined that MP3 format is good enough for them to include in the standard kit.



What a mess.

Appreciate the follow up.

Thanks again, Tim.

-- mike
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!