I'm looking for an Java API able to convert various audio formats, especially WMA and AAC, to MP3. Any clue?
I doubt that you will find native code for that, but you can take a look at one of the Java wrappers from ffmpeg like FMJ or Jffmpeg.
Related
I have to create a website of vod (films), and the problem is that i have to convert my video to different formats to be supported by all browsers (mp4,ogg and webm), the problem is that when someone will add a film with a size >1Gb, the conversion to the other formats will take a lot of time (I tested ffmpeg and xuggler api on java ), is there any other library faster than ffmpeg or an onother approach to manage my large videos?
Thank you
I have done some research on converting mp4 to wmv in java but have not found anything but advertisements on applications that convert mp4 to wmv. I do not know where to start when converting videos in java and I would be most grateful if anyone could help. I'm not into fancy graphical java apps so just command line would do nicely. Thank you.
to convert mp4 to wmv take a look at ffmpeg
Have you tried JFFMPEG. Also you may want to look into mencoder and ffmpeg.
Is there any freely available library (other than java media framework) that I can use to extract the bit rate (eg. 128 kbps, VBR) and the audio quality (eg 44.1KHz, Stereo) from a MP3 file?
I would like a standalone library that I can incorporate into my application jar, to be deployed on older Macs too that have only Java 1.5 available and I can't get them upgraded or add any big Java library to.
Just to clarify: I will not play, transcode or do anything of the sort with the audio stream itself, I am interested in the metadata only.
I confess I do not know much about MP3 files, but you can see from the format specification that all the informations needed are in the 32 bits long header of the file.
You could open the MP3 with a FileInputStream, read the first 4 bytes of the file and, using some simple binary masks, retrieve the informations you need. IMHO using a specialized library for that is a bit of an overkill.
Take a look at JAudioTagger, plain simple and easy to use, the data you are looking for is into MP3AudioHeader class, with methods like getBitRate()
You can use the LAMEOnJ library:
http://openinnowhere.sourceforge.net/lameonj/
This java library is light but you must have the LAMELib installed on target computer.
I'm not a java programmer, but i'm pretty sure you could read the mp3 file into a byte array then see http://www.mp3-tech.org/programmer/frame_header.html for frame info.
This format specification shows you what's contained the MPEG (mp3) header. You can write code to retrieve this header.
Is audio recording in the OGG format possible?
Yes. However, first, you need to decide what codec to use. ogg is a container format like avi or mkv or mp4 - just knowing the container doesn't tell you everything about the format. If you want vorbis, there are some pure java encoding libraries (eg vorbis-java) out there (not sure how polished they are!) or you can use JNI to bind one of the many C libraries. If you want some other codec, perhaps better suited to voice (speex? something else?) please specify.
I am looking for an media conversion library that can convert and compress various media i.e both audio and video files to various formats.
FFMPEG-PHP is a popular choice for extracting information. It doesn't re-encode files, though. http://ffmpeg-php.sourceforge.net/
But if you have an instance of FFMPEG installed on the machine, you can call FFMPEG via the exec function in php.
Eg: exec(’ffmpeg -i ‘.$SourcePath.’ ‘.$Destination);
I think your best bet is ffmpeg-php (can be used for both audio and video conversions). Imagemagick has a few basic video conversion options as well.
A second option would be to use mencoder from the MPlayer project (again, you'll have to call this as a command line tool). The main difference between ffmpeg and MPlayer is that the former comes with open source codecs while the latter comes with a host of codecs from all kinds of sources plus it uses ffmpeg.
So ffmpeg is a little more simple to use, MPlayer can convert between many more formats but the command line gets pretty complex.