I'm working on a web project, where a user can share his screen and the output of his sound card with other users. I've come pretty far with the Adobe LCCS service (http://www.adobe.com/devnet/flashplatform/services/collaboration.html), but the screen sharing isn't stable enough to transmit a running video from the user's computer - it stops every 2 seconds.
It seems the only other way is to use a Java Applet. There are several libraries to share the screen. I'm looking for a way to capture the screen contents and stream it via RTMP to a server.
I have found a Java Applet, which captures screen shots of a defined area in a certain interval, encodes it into the ScreenVideo codec and streams it to an RTMP capable server: http://code.google.com/p/red5-screenshare/
Related
I want to create a simple personal live audio system. Just like a personal radio station. (I know there are many personal radio station services, but I want to build my own here)
Here is a simple explanation I want to build.
1. Build a server side code with Java that keeps playing specific audio files 24/7
2. If I connect to 1's address from other devices I can listen to it
The point is that I want it to be like a radio station.
It is not like the audio file is triggered to play by connecting 1.
1 is always playing and if I connect to it, I am going to get to listen what 1 is playing at the moment I connect to it.
I know this is a pretty broad question, so the simple steps are welcome.
i.e: You can use this java library to make server playing your music 24/7, and this method to listen to it.
Thank you for your help in advance.
Something like HTTP live streaming or MPEG-Dash should be relatively easy to implement in Java. Both work by splitting audio files into short segments and serving them via http, along with some metadata indicating the current position and which segments are up next.
There don't seem to be mature Java libraries for them, but one could probably use other tools like gstreamer. See the wikipedia pages for possible clients.
I'm putting together a HTML5 based webcast client, but ran into a catch with the webcam streaming. I currently use icecast to stream the video to the clients, but this has required a different source client for each OS plus an install for each computer.
I have been looking into using a Java Applet until the StreamAPI supports webcam to server, and have seen OpenCV recommended for aquiring the video. Now I'm trying to find a library to pass the video to Icecast. Is there such a thing avalible?
I'm also willing to use other applet designs (i.e. flash) if that would be better.
Hello I want write my own desktop sharing application in Java.
The application should have some very default features:
Capture screen;
Allow a remote connected user to click / edit fields.
I was thinking to use Java Robot class for mouse movements / key pressing.
The problem is i don't know what screen capture strategy to use.
Should I make sequentially screen captures (on the hosting computer) every second, and send those captures with UDP via network, so that the clients can intercept the data-grams ? Isn't this a little overkill for the network ?
What other strategies are available ? (Except trying an already existing app).
PS: If necessary I can even write native code using JNI (still that's the last thing I planning to do).
Later edit:
After some investigation I've come to the conclusion of #Thorbjørn Ravn Andersen . Java is probably not the best choice for this kind of application. I can try to use JNI, but that code will cover 75%+ of my project.
I will try to find other alternatives.
Have a good long look at the Ultra VNC project on SourceForge. Great place to start.
In pure Java you cannot access structured information on system windows, nor monitor all relevant system events, so the performance of the display synchronization will not be optimal. Also there are privileged windows, which do not accept mouse or key events from Robot. Remote video streaming is not an option!
With named restrictions your attempt with the Robot class is valid.
Robot.createScreenCapture(Rectangle) will put a Desktop section into a BufferedImage, which you can send to the client window.
On client side you can capture keyboard and mouse events and send them to a Robot object on the server side.
Without knowing the actual extent of system windows, it will makes sense to work on a grid of Desktop tiles:
captured BufferedImage-s of tiles may fit into the buffer of the transfer protocol.
capturing period may locally be optimized for tiles with high entropy (-> Capturing Strategy).
Further traffic minimization
Consider differences of subsequent Desktop contents, only
Compression of tiles by PNG or a PCX-like method
For sharing over internet, Peer-to-Peer connection may be established by
a public proxy server
UDP hole punching with, for connection establishing, a necessarily public mediator server
In any case the protocol needs to be secured and delivery asserted.
I would like to stream my desktop screen (or just one application), via Flash player, to the internet.
I have wowze media player to multicast it but I have to create a stream to give to wowze.
Does anybody have have any idea how to start what would be the best way of doing this?
http://1.pe-web.ro/dev/flashPlatform/flashBuilder/flexJavaApplet/flexPrintScreen/
You could start from here. This is an app that uses Java to capture the screen and sends the picture to flash
Or you could use a RED5 server and TightVNC with a customized version of the Java client that will publish frames as a stream.
Jing is a cross-platform (Windows and Mac) option. Captures the screen, plus audio. Very cool.
I don't know any "out of the box" software use the Flash Player to encode your screen and stream it to Wowza. I do believe that it must be developed from scratch.
But I've been using for a while a Java based desktop encoder that streams to Wowza media server. It is part of the Red5 ecosystem: red5-screenshare
If what you mean by create stream is to have a virtual camera that captures your desktop screen in a way you can select in your multicatser app then you should check out ScreenCamera. It does exactly that and you can select the frame-rate you want. You can find ScreenCamera here:
http://www.pcwinsoft.com/screencamera/download.asp
http://www.pcwinsoft.com/screencamera/
Hope this helps,
Alex
I am looking to create a video training program which records videos - via webcam, user screen capture and captures sound. Now the main problem is that I need a cross-platform (mac and windows) solutions.
I know its possible to use flash to record webcam + audio. But its not possible to record the user's screen via flash.
So am wonder if I should use Java (which i believe will work on mac & windows). I do not want to develop to separate versions because of the cost involved in developing two versions.
Please guide me as I am new to this.
Thank you.
UPDATE
Hello again,
I had a look at the following site: www.screencast-o-matic.com or www.screentoaster.com. I see that they have developed a java applet which helps interact with Windows/Mac to record the screen.
I am wondering how to go about developing something like that and integrating it with Flash (for webcam and audio recording).
Is this a better idea?
This is not an answer to your question, but I strongly recommend against using video for educational programmes. Our company delivers university courses on-line, and we long ago learned that video feeds are only effective under particular scenarios. In general, a talking head is a waste of bandwidth. You're much better off to put together a well designed powerpoint presentation, record a voice-over (and edit it!) and then assemble the whole thing as a flash presentation. This is a non-trivial amount of work, but it provides a much more interesting product for the student.
When to use video:
1) When you are demonstrating something dynamic - Mechanics or Chemistry for example.
2) When you are acting out a scenario or case as an illustration -- For example, threat de-escalation techniques for high school teachers.
When you solve the screen recording problem, seriously consider whether you need full motion or if you can get away with stills. Often the motion is distracting, and a still with good voice over can be more effective. (Hint: Replace mouse pointers with something HUGE before recording -- Like Fox did with hockey pucks)
Try CamStudio. I don't know, if it works on Mac, but on windows, it's the best solution I know. It's open source, so you can use it's source code, if you want to :)
If you're looking to build an application that does all of the recording and screen capture itself, then you might consider using Adobe AIR (essentially, Flash running on the desktop) in combination with Merapi. Merapi is essentially a bridge between Adobe AIR and Java. So for example, for your project, you might use Java to handle the lower-level (but still cross-platform) stuff you can't do natively in AIR, and use Merapi to wire the Java application to your AIR UI.
This is by no means a simple project. Lets get that said and out the way. There are open source (and cross-platform) options for each element, but nothing (I know of) that will do everything for you.
I think the "cleanest" option would be to use Flash for webcam and audio, as you said, and run a VNC server to send the screen video... The only closed-platform code will be the VNC launching code. That should be pretty simple to maintain!
That raises a problem because most people are behind NAT firewalls these days. Setting up port forwarding is a pain in the behind. I've used an app called Gitso before which allows people to connect to me and send their desktop to my screen (for tech support). Its VNC-based and all it really does is add another layer on top of the VNC connection so rather than me connecting to them, they connect to me. That makes the whole business of port forwarding a non-issue.
And once you've recorded everything, there's the final issue of syncing it all back together... Might not be so hard.
Well, Camtasia provides the solution to get your problem done. It can record the onscreen activity and also the webcam video and put them in the same player template. Another screen recorder DemoCreator can publish the screen recording as Flash movie, but can not record the webcam.