This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes Easy way to convert wav file to mp3 file on the fly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Easy way to convert wav file to mp3 file on the fly" Watch "Easy way to convert wav file to mp3 file on the fly" New topic
Author

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

ripu sudan
Greenhorn

Joined: Dec 07, 2010
Posts: 20

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

Joined: Aug 27, 2012
Posts: 1166
    
  17

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

Joined: Mar 22, 2005
Posts: 42958
    
  73
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

Joined: Aug 27, 2012
Posts: 1166
    
  17

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
 
subject: Easy way to convert wav file to mp3 file on the fly
 
jQuery in Action, 3rd edition