views:

344

answers:

6

I am in the concept phase of an application that is going to have a lot of Audio/Video input and output. I want to do it in Java; but somehow am not fully convinced yet. What do you think? How bad could it be? And any advices?

Why I am thinking Java:

  1. It's the language I'm most comfortable with.
  2. Easier cross platform migration would be a bonus.
  3. Cannot afford commercial platforms (like .NET) or not good enough in other free alternatives (like Python)
  4. I'm also slightly inclined towards C++/Qt; but that would take more time for me as I'm not great in that and I am a bit worried about maintainability.
+2  A: 

Easier cross platform migration would be a bonus.

Audio and video means you will be dealing with dedicated native libraries and JNI-wrappers for each supported platform; in this case, the cross-platform argument for Java does not really apply.

pmf
agreed. but I find a lot of wrappers already available for java. i'm targeting only windows and linux.
Rusty
+1  A: 

C++ would be the first choice because of performance concerns often present in Audio/Video processing as well as the range of available libraries for video/audio.

You do make a good point about being familiar with Java. If you are pressed for time, this is even more important. However if you can spare some time for learning, C++ would be well worth it.

Regarding .NET: The .NET SDK with everything you need is freely downloadable. Get hold of a free IDE such as SharpDevelop and you are up and running. It's Visual Studio that costs money, you don't need Visual Studio to do .NET development.

Ash
thanks for the tip on .NET. Related to that how stable is Mono? Is it really usable?
Rusty
I last looked at Mono about July 2008. I think the functionality available is quite stable, however not everything implemented on Windows was yest available on Linux / OSX. For example: a .NET Windows Forms based application worked well cross-platform as long as you don't need to use any complex/advanced UI controls. I had a few issues with the Web browser control not working very well on Linux / OSX (but fine on Windows). If you can do without a complex UI in your app, Mono should be fine.
Ash
A: 

Rusty.in,

How about trying to do JavaFX Media API. Recently, the version of the JavaFX is 1.2.0 with GUI Application as well. It supports the Swing. The grammar is based on the script style; however, you can deploy the existing Swing components into the JavaFX.

I hope it helps.

Tiger

Tiger
thanks; will give it a try.
Rusty
+2  A: 

I believe that when you want to write an audio/video application, the programming language you will use is the second most important thing. The most important thing is the audio/video framework your application will use since this is what defines your capabilities.

I am aware of two popular generic video frameworks that can be used to accesd most multimedia types: Directshow and ffmpeg. Directshow is tied with windows, so only ffmpeg is left.

Ffmpeg has versions in both windows and unix and, although it is written in C, it can be used from a lot of languages.

There is even a number of java wrappers for ffmpeg (for instance, take a look at xuggle)!

Serafeim
+3  A: 

If you're interested, check out Xuggler. It exposes all the power of FFmpeg, but as a Java API that runs on Windows, Mac and Linux. The advantage is you get all the power of FFmpeg but from Java. The disadvantage is it requires the FFmpeg native DLLs/shared-libraries to be installed.

Xuggle
A: 

Rusty, what did you wind up doing? I too have a video app I'd like to do, but really would prefer Java/JavaFX over C++. The thing about the using Flash and/or the current JavaFX video support is that Flash video playback is not frame-accurate. I really need to be able to stop/start/step on individual frames like you can with QuickTime.

Has anyone tried doing playback with Xuggler and Java/JavaFX?

Cameron O'Rourke
Cameron, I finally decided to take the C# route (with SharpDevelop as Ash had suggested above). I'm not done with it yet, currently focusing only on Windows, till I get a quick and dirty running app.
Rusty