Is there AMR to WAV , WAV to AMR converter available written Java? I need to do conversion in realtime. Looking for open source, free or paid.
Thanks.
Your best bet would be to call ffmpeg from within Java. Sadly, I don't know of a good solution which is java-only, but using ffmpeg allows you to use the wide range of codecs available to this program (which includes AMR support).
Related
I wonder if there is a lib, like Apache Commons, or something of that sort to help convert media-files (e.g. avi, mkv, mp4 etc) any-to-any? For example an InputFile is in format .avi and an OutputFile is in mp4.
See either of the following to convert between a range of formats.
Jffmpeg is a plugin that allows the playback of a number of common audio and video formats. It is based around a Java port of parts of the FFMPEG project, supporting a number of codecs in pure Java code. Where codecs have not yet been ported, a JNI wrapper allows calls directly into the full FFMPEG code.
Xuggle - A free open-source library for Java developers to uncompress, manipulate, and compress recorded or live video in real time.
The only library I know for that is ffmpeg, but you will have to run it through JNI.
Actually, we need to convert a WMA audio file into FLAC. But there's a lack of ways to convert WMA into more convenient formats. Can you recommend us a library, that can help us, or something like that?
What you need is JAVE:
The JAVE (Java Audio Video Encoder) library is Java wrapper on the
ffmpeg project. Developers can take take advantage of JAVE to
transcode audio and video files from a format to another. In example
you can transcode an AVI file to a MPEG one, you can change a DivX
video stream into a (youtube like) Flash FLV one, you can convert a
WAV audio file to a MP3 or a Ogg Vorbis one, you can separate and
transcode audio and video tracks, you can resize videos, changing
their sizes and proportions and so on. Many other formats, containers
and operations are supported by JAVE.
MFSampledSP supports WMA.
It's suitable for Windows 7 or later.
I would like to perform a FFT on frames of an MP3 file using Java (think spectrum analyzer). I found JLayer which seems to fit the requirement of MP3 Decoding, but I'm not sure how to use it (Most examples are simply players that use the higher level helper, but that's not what I am looking for). FFT seems easy compared to decoding MP3 files ;)
My question is basically this: How would I take an MP3 file in java, and decode it to raw audio data for analysis in Java using JLayer
I am on the same Boat - trying to decode and analyze MP3 files using Java. You may want to check out MP3 SPI from the same author. There is a good example of getting the raw decoded PCM data from an MP3 file in his page:
http://www.javazoom.net/mp3spi/documents.html
Good luck,
Uri
Which audio format would provide the least lossy conversion into mp3 and ogg through ffmpeg.
I am tending towards wav, but I would like to make sure.
Also, I am using the SDK java audio applet to allow users to upload. Does anyone know if there are any issues with this applet, or if there is a better option out there?
Obviously, uploading files already in MP3 and OGG format would provide the least lossy conversion since you don't need to convert at all.
About the SDK java audio applet: Is this really needed? You can also upload a file using just a HTML form and PHP.
FLAC is lossless, and so is WAV. FLAC is smaller than WAV. If you need something that you will be converting into multiple formats, opt for a lossless format.
I would like to find a FREE MP4 (container) writer for Java. I do not need an encoder, only something which can write the correct atoms given their expected values. Bonus for such a library that also can write "valid" F4V.
I would prefer a pure Java solution rather than something using JNI or external executables.
Even though my answer comes very late you could have a look into my MP4 Parser/Unparser at Github. You can parse MP4 files, modify them and write the result. You can even start from scratch creating boxes programatically and write your object representation to some sink.
You can have a look at JCodec ( http://jcodec.org ). It contains an MP4 library and MP4 demuxer and muxer.
May be you are looking for something like StreamBaby.
Can't vouch for it, but red5 is an open source flash server written in Java, which claims support for streaming mp4 and has implementations of mp4 IO objects which may be able to create said format.
Also, IBM created their Toolkit For MPEG-4 a while back and though it's not free, it might help.
FFMPEG's java bindings?
http://fobs.sourceforge.net/f4jmf_first.html
Or simpler a JNA proxy over some C++ MP4 library.
I have implemented a QuickTimeWriter class which can write a QuickTime container in pure Java.
As far as I know, the QuickTime file format is structurally equivalent to MPEG-4 Part 14. There are only a few minor differences in the fields inside atoms/boxes.
So, with an MPEG-4 spec on your lap, and a few hours of work, you should be good.
The Java I've seen which modifies MP4 files would invoke Nero AAC Codec externally (a Windows native .exe which Nero does not supply the source for) to modify AAC files (which are Apple's audio-only MP4 files). It works for audio only, not to video.