• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

WAV files to MP3 and MP3 to WAV  RSS feed

 
Bartender
Posts: 1661
17
  • 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
 
Saloon Keeper
Posts: 20657
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • 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
Bartender
Posts: 1661
17
  • 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
Saloon Keeper
Posts: 20657
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • 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
Bartender
Posts: 1661
17
  • 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
 
Attractive, successful people love this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!