Java and video codecs - java

I want to build java app, which will record some application. Could you provide me any links or solutions, which codecs should I use for windows , mac and linux, should I use three diffirent codecs for each OS or there is standard codecs for every OS. I want to create video in divx codecs or avi, but preffered is flv. I'll be thankfull if you help me.thanks. (and: it has to be java app)

Take a look here for a java codec pack for JMF

Well...you can refer Java Complete Reference book where there is a chapter dedicated to multimedia...maybe you'll get some info from that...I'm not sure about any other resource...

Related

How to change voice in FreeTTS - Java

I am running a program in java in which i use FreeTTS Voices, what i want is to change the voice.
when i run the program it shows:
"System property "mbrola.base" is undefined. Will not use MBROLA
voices."
I use the following code to speak up the text i want
Voice voice;
voice = voiceManager.getVoice(VOICENAME);
voice.allocate();
and then
voice.speak(t4.getText());
I tried to find tutorials to insert MBROLA voices. One of the tutorial i found was on their web page: http://freetts.sourceforge.net/mbrola/README.html but i am in windows not don't know anything of MAC therefore i am unable to know how to do it. Other tutorials were on Linux and i therefore even don't understand them. I am using netbeans on windows and i want someone to clearly explain me how to do this. I am a newbie and 14 year old.
If you look at the link you submitted, there's a big message that says: "NOTE: FreeTTS support for MBROLA on the Windows platform has been troublesome in the past, but appears to have been fixed by the MBROLA team. Please refer to the FreeTTS Forum for more information."
Here's a direct link to the forums: http://sourceforge.net/p/freetts/discussion/137669/thread/848a09ab
You have to specify the path to the mbrola folder, either by properties or directly via the code:
System.setProperty("mbrola.base", "c:/.../mbrola");
For more see e.g. FreeTTS mbrola not able to find path

How can I take image at webcam with javaFX at win7 64bit?

I want to take an image from webcam. How can I do this?
If is there any sample codes for your advice library, it's better than other for me.
I examined these:
Jmyron
Java Media Framework
JavaCV
lt-civil
These are not useful. These do not work or do not have sample code.
Have you got any advice?
Try this project:
http://github.com/rladstaetter/isight-java/
and the corresponding blog post
http://ladstatt.blogspot.co.at/2013/04/using-isight-camera-with-javafx.html
Keep in mind that you'll have to have the correct opencv dll for your architecture (x64)
I stripped down OpenIMAJ Core Video Capture Library to get images from webcam. It works well on my macbook, linux deskdop and windows 7 env.
You don't need to install anything, two jars are all you need. You can find the example from my site:
http://www.sleepingdumpling.com/blog/download/jvideoinput/
Here is a link to a Demonstration JavaFX Camera capture application using LTI-CIVIL
You are correct that the LTI-CIVIL library is 32 bit only, so perhaps not useful In your case if 64 bit is an imperative.

Using JMF on Mac OSX

I'm trying to use JMF (Java Media Framework) to play a video. I've tried sample code from four different websites now. I'm using a Mac running Lion.
Everytime I load an mpg file I have, I get:
Unable to handle format: MPEG, 352x240, FrameRate=29.9, Length=126720
What does this mean? Are there problems with JMF? I'm using the cross platform version.
The cross-platform version will probably not support too many formats. There are performance packs which might help. But there isn't a performance pack for MAC and probably never will be.
You can try Jffmpeg, which provides MPEG codecs (among many other formats) for JMF. However, bear in mind that the last release is 2006.
Another alternative if FMJ.

Please suggest a platform to port C# app to Mac?

Greetings,
I need to port this Windows utility: http://solinker.com to Mac.
The app was written in C#, .NET 2.0.
The main requirement is:
The app should be able to talk with AppleScript to interact with Photoshop. The program is small and UI is simple so I could consider to fully rewritte the app.
Possible candidates are:
MonoMac
Unity 3D (seems it doesn't required to install the Mono)
XULRunner (Flickr Uploader written by XULR)
QT
Java (convert all the app to Java + 2 different connector to photoshop:
for Mac and for Win)
I would be appreciate for any advice!
I'm not experienced with others but can definitely suggest MonoMac. It looks and feels like any other Mac app while running on Mac. On the other hand, if the application was written with Visual Studio on Windows, it never properly works on MonoMac. So prefer MonoDevelop, if you go this route.
If you check the documentation for MonoMac, you will see they have a packager which bundles all dependencies with the final app. So, no need for a seperate Mono install:
http://www.mono-project.com/MonoMacPackager
As for AppleScript, MonoDevelop does some wrapping of AppleScript. You should take a look at their source:
https://github.com/mono/monodevelop/blob/master/main/src/addins/MacPlatform/MacInterop/AppleScript.cs
I would say MonoMac is your best approach.

Efficient Webcam Library

I need an extremely efficient webcam library (I'll explain later) that works on all platforms.
Basically there will be two webcams and I need to alternate between them at a very fast rate (a least 50fps, it has to be a fluid video still)
Anybody have experience in this field and have some suggestions?
While developing my Webcam Capture project I've tested several frameworks and decided to use part of OpenIMAJ framework. I actually had to extract part of its core-video-capture subproject and refince code to remove all necessary dependencies it has. When I included refine code in my project I was able to stream 250 FPS (EDIT: due to bug in Windows impl) 50 FPS as BufferedImage objects (on Windows XP, without painting, just fetch image from webcam). I can honestly recommend it since it is compatible with most operating systems - Windows (x86 and x64), Linux (x86, x64 and ARM), Mac OS. If you are interested, you can find refined code here.
JMF is also very fast, but its pretty outdated and not maintained any more. It's not portable - when you want to use it, you have to install JMF.
I don't recommend JavaCV, it require huge OpenCV installation package (~100MB), have no Java documentation and it's not portable.
LTI-CIVIL / FMJ are also outdated, not being maintained any more.
VLCj work correctly only on Linux (since it is using V4L4j) and you have to have VLC installed on your PC (not portable).
I have used OpenCV for Java ( http://ubaa.net/shared/processing/opencv/ )
It is very "user-friendly", but I do not know the exact parameters about its efficiency.
A while ago I used Java Media Framework to process and save stream from webcam (Didn't had any performance issues with it). Maybe it could help you in your task.

Categories