Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Easy way to convert wav file to mp3 file on the fly

 
ripu sudan
Greenhorn
Posts: 20
Java Linux Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

Can anyone tell me how to convert wav file to mp3 file on the fly via servlet.
My requirement is whenever a user hit that servlet it simply read a wav file from server and return mp3 converted file of that wav file.

I have waste my lots of time on this but could not find any solution..please help me :cry:
 
Richard Tookey
Bartender
Pie
Posts: 1166
17
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why 'on the fly' ? I use the non-java program 'ffmpeg' to do the conversion and it is available for both Windows and Linux and I would bet also for OSX. You could invoke this using ProcessBuilder.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's also a Java wrapper around ffmpeg called jffmpeg that acts as a plugin for JMF, so you can make direct API calls. Links are here: http://www.coderanch.com/how-to/java/OtherOpenSourceProjectsFaq
 
Richard Tookey
Bartender
Pie
Posts: 1166
17
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:There's also a Java wrapper around ffmpeg called jffmpeg that acts as a plugin for JMF


I didn't know about the wrapper!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic