i need to implement crop operation over a Video,is there any builtin class or third party library available or is there any alternate approach. I already had a walkthrough from android developer to Mr.Google !
As far as I know android has no built in API's for those video manipulations. I recommend FFMPEG. Go through this tutorial once. I have used xuggler with java swing. It served well and I think it might help you.
Related
I am trying to use javax.sound package in android. But android stopped this javax support. I have tried to port my javax.sound dependent code to android also but its not working. The key point is I need the sound raw data from AudioInputStream like the javax.sound package do.
I m lost somewhere I don't know. If anybody knows about the alternative of javax.sound package please reply.
If you need to read the data from the devices, there is a class called android.media.AudioRecord which will help you read raw data. If you need to decode some files, and you are using Android 4.1+, then you can also use the class android.media.MediaCodec, which provides the necessary low-level interface to audio codecs.
Well, In my knowledge of java I thing javax is a package that supports swings that is a toolkit used for UI and Multimedia operations.
But this is not supported in android-sdk as you have a number of options to achieve the same and have a good responsive and needed callbacks via sdk provided methods.
So I will recommend you to go for MediaPlayer API provided by android that would suffice in your case.
My question is exactly as the title states. I've spent some time googling and all I can find are recommendations to use external libraries. However, I'd like to do this without using any external libraries and documentation is lacking on how to go about this.
I'm afraid it is not possible. The two main approaches in java is to use either JMF or openCV. JavaFX has no plan to develop a Webcam API so it is not going to change soon.
You should look at this question: How can I take image at webcam with javaFX at win7 64bit?
Here is a link to javafx + opencv integration: http://ladstatt.blogspot.fr/2013/04/using-isight-camera-with-javafx.html
JavaFX + JMF does not seem to work now: Webcam access from JavaFx
But there is hope with JavaFX 8: https://github.com/carldea/WebcamFX
Not possible without external libs unless you depend on JNI. Period.
In the past I got good results using JTwain-based solutions.
I am really new to the java & android apps development. Currently I'm doing a prototype application about the voice recognition. Which use the sphinx4 speech recognition. I'm really no idea that, is that Sphinx4 can be used on the android SDK?
Using Sphinx4.0 to build a speech recog. Android application (this shows that, it can't)
https://sourceforge.net/p/cmusphinx/discussion/sphinx4/thread/ce6ee093/ (But this said it can.)
if yes, i really no idea how to make use of the sphinx4, anyone can kindly provide the guide for me to complete the prototype?
Thanks for your kindly help.
It is possible to run Sphinx4 on android, however, you need to remove sphinx4 parts that use desktop-specific java api like java sound API. You still can have the core in place and demo should work as expected.
You need to reimplement Microphone class to use android API for sound input.
For more details see the discussion about that:
https://sourceforge.net/p/cmusphinx/mailman/message/31317160/
So it is some work and it requires coding skills. If you don't have that, use pocketsphinx instead like Opiatefuchs suggests you. It's well documented approach which requires minimum efforts.
I also tried to do some App with Pocketsphinx, not Sphinx4. I think this is really not designed for android, but maybe You could get it work. But for which reason? PocketSphinx is a good designed API for including in Android. I had mad some tutorial on my website for how to get the Pocketsphinx work, I advise to stop thinking about Sphinx4 because it would be a heavy coding thing to get it work. PocketSpinx has all You need...look at my Tutorial, this is a better way:
https://sites.google.com/site/opiatefuchs/home/pocketsphinxandroiddemo
Until now I stopped working on it, but when I got time, I will start to include Pocketsphix into an apk. But this tut only shows how to get the example demo work and set up Your runtime environment to work with Pocketsphinx.
i am trying to capture video from my /dev/video1 usb camera using java, i was wondering as to how to actually do this? my project is supposed to capture the video and stream it to another computer. is it also possible to set up an avconv server using java?
Java does not have an extensive support for media. You can use GStreamer JNI bindings for this or switch to QT or native C/C++ GStreamer.
It's already been done for you so you might take a look into the existing projects.
v4l4j wouble be a great place to start.
update
As Andy Ross commented the library I linked is very low level and you may be looking into something more easy to use as gstreamer-java.
How can I get video and audio streams from web cameras with Java (in a cross-platform way)?
For example, we have a computer with 3-4 USB web cameras; we want to get their streams and make them visible in the user interface. How can we perform such a thing? I need code for a simple app which would find ALL cameras on the computer and let us select camera to wach. Can any one, please share such one?
With java media framework JMF or FMJ
Here is an example with JVM
I see your comment about the solution needing to be "pure" java, but this is really "nearly" impossible. You will need to use some sort of native library for accessing the devices, with that being stated; I suggest that you look at Xuggler as your solution. Xuggler supports Windows, Mac, and Linux and they also offer example code for handling audio and video. Lastly the library is FREE.
Webcam capture example: http://xuggle.googlecode.com/svn/trunk/java/xuggle-xuggler/src/com/xuggle/xuggler/demos/DisplayWebcamVideo.java
While Xuggle does not have an example of microphone capture, you can find samples on the mailing list or you could use code written by the packet-mulitbroadcaster project found here: https://code.google.com/p/packet-multibroadcaster/
You can try my solution. It uses OpenCV to capture the image and jetty server to transmit it via WebSocket. The example has three classes and it will be easy to understand.
Now I can send only video, but I'm working on audio aswell.
I'd use flex. It can be relatively easily integrated with java backend.
UPD:
Pure Java needed
Then you should consider JavaFX solutions. I'm not a big expert in javafx, I've only written some basic test applications, but I'm sure it's a modern way of solving described problem with pure java.