This content has been marked as final. Show 4 replies
1 person found this helpful
Lupan wrote:Look up FMJ.
I need to build an application which records audio and video from webcam and makes transformations in that video using the latests codecs and formats. The Development Platform should be Java EE 5. The standard API for this is JMF, but unfortunately it's development stopped a long time ago and so I don't know if using it now is the best choice. I would like to know If there is any better standard alternatives for dealing with media in the Java and Oracle platform for the requirements I mentioned in the beggining.
I've tryed Xuggle framework but unfortunately it's support for webcam recording is very limited. What I'm currently doing is making a raw recording in AVI format using JMF and then converting it to MPEG-4 (H.264) using Xuggle. Unfortunately this solution does not work very well because the Raw AVI consumes too much space in disk, a couple of minutes takes gygabytes. The best choice would be to make JMF use the H.264 codec instead of it's default ones so the recording would be alreadly in the right format. I could not find any solution to add a Codec which encodes in H.264, only decoders... so any help will be much appretiated.FMJ may do H.264 encoding... if not, you could build your own H.264 encoder for JMF to use directly.
Thanks for the reply !
Do you know a source where I can learn how to add a new Codec to JMF ? I'm getting poor results from google.
That's the example of how to build a custom codec, techincally. It's a codec that simply decodes PCM to PCM_RTP, but the code structure is there.
Essentially, a codec isn't anything more than a Process function, where your job is to take the input buffer, transcode it, and then write it to the output buffer. Prior to being called the first time, setInputFormat / setOutputFormat should be called to specify the transcoding parameters.
After you have that coded, you just need to register your codec with JMF so it'll know where to find it / what it does. (PlugInManager.addPlugIn logic in the AVCustomTrans.java)
Thanks capt. foss !