• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 20
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: https://coderanch.com/how-to/java/OtherOpenSourceProjectsFaq
 
Richard Tookey
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic