The problem I am trying to solve is playing a video streamed online to a laptop, and then having the laptop play it on HDMI/VGA connected monitor.
Are there any good libraries tutorials in Java for doing this? Or is there a better cross platform language to accomplish this?
Related
Current status
I have successfully recording videos from RTSP with the help of javacv which is not purely on java.
Problem
Create pure java application. Found boofcv which is completely java. Have found example for recording in android device. My program is not in android its should run in windows and linux. Need to record many camera at the same time.
Objective.
Motion detection which is implemented in javacv just need to port into a independent java program.
Extra information
Using rtsp to get video from cameras.
Thanks in advance.
I would like to develop an application which would be able to capture video from a webcam, capture sound from a mic and capture movement if a proximity sensor is available.
Initially I want it to run on windows but if able I might want to make it work on android later on.
I'm looking for something pretty straight forward and easy to understand.
My research has led me to Java Media Framework but it is too old and abandoned.
FMJ seems also old.
JavaCV appears to have poor documentation available.
My goal is to make a home detection app which uses the camera imagery, mic sound and sensors to detect and analyze home invasion.
I might take a leap and do it in .NET or other object oriented programming languages if
easier solutions present themselves.
How should I approach this, what are your suggestions?
One Solution is use JavaCV. So you can develop your desktop application using java and later can be ported in to android with fewer changes. As you said JavaCV haven't rich documentation. But JavaCV is just a wrapper to a OpenCV. So you can read OpenCV documentaion and find the relevant method(function) names. The methods in JavaCV has almost same names as OpenCV. So you can try those methods in JavaCV.
Next solution is use .NET to develop the system. There you can use
AForge.NET a rich library for .NET or Emgu CV .NET wrapper
for OpenCV. But you will be facing a problem when creating the
android app. Because you have to build it from scratch.
I am an average java developer and i am trying to come up with a browser that is developed entirely in java. I want that my browser must be able to play youtube videos, and for that i was planning to use JMF.
Here are my questions:
1) can JMF be used to stream and play videos from links like youtube. If yes, can Some one please point to a demo link(a basic one will do, rest i will develop)
2) If that is possible, should we use JMF or VLCJ? If you recommend VLCJ, where can i find "libvlc"? I had a hard time looking for it.
Thanks to everyone for their help in advance
JMF seems to be abandoned, so VLCJ is a better choice
you can find libvlc.dll here . Pick the biggest. Or just install VLC player.
JMF is quite obsolete right now. It's so old that its player won't open any of the video files used nowadays and if you're trying to capture webcam video you won't be able to detect your camera if you're running on Windows 7.
I heard Xuggler is fine but I really couldn't get it to work after trying hard for a few days so I would recommend VLCJ, which works great and its really easy to set up.
The libraries used in VLCJ are included in VideoLAN's folders when installing VLC. Just install VLC's last version and go to C:/Program Files/VideoLAN/VLC/ and there you'll find both libvlc.dll and libvlccore.dll
VLCj will play Youtube videos easily, JMF won't and is long dead - I wouldn't touch it for any new projects personally. If you're going down the VLCj route though you'll want to look at out of process players, you can't reliably include multiple players in process.
You cant do youtube with JMF. Also check out Xuggler
I have to play flash (swf) in my program when the user clicks on a link. Which is best? Concentrate on android 2.2 and use the Adobe Flash Player, or what do you recommend? I have tested WebView, but can not play swf in the emulator. HTC has a custom flash player but it feel like a limitation.
Some code samples to play swf in android that works for as many users as possible?
Have you considered using Flash to create an AIR app for Android rather than using Java? If you have to download and run external swf files, this seems like a path of least resistance to me. Of course, this requires learning ActionScript, but it's not difficult if you know Java.
It's hard for me to give you a solid recommendation, much like toggy-tog-togs answer. B/c we don't know exactly how many swfs or what kind of swfs you are playing.
I mean, if your application is pretty much just playing swf's and you need a UI to run it, it might be worth looking at Air and Flex.
However, to address that first problem you had. I haven't tested it myself, but I am nearly 100% certain, that your emulator won't play flash content in a webview b/c you don't have flash player installed on the emulators. :-) Android supports Flash content but only after you download and install the player from the App store.
So you might want to try running your emulator and installing the Flash player app. I don't even know if that is possible but you ought to try it out. :-)
By the way, the Android emulator is trash, if you are serious about developing for the Android platform, you really have to pick up a device or two to debug on.
Good luck!
So your using JAVA if you are then it is best to open up the browser that is the easiest but if you are wanting to use it in the application (This is less loading time if it is included in the package) but it costs try using JFlashPlayer (It Costs For the full version) http://www.jpackages.com/jflashplayer/download/ This runs very fast on the android platform. Hope I could help.
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.