File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
Ranch Hand

Joined: Aug 27, 2012
Posts: 1111
    
  10

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
Marshal

Joined: Mar 22, 2005
Posts: 42942
    
  68
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
Ranch Hand

Joined: Aug 27, 2012
Posts: 1111
    
  10

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