views:

606

answers:

3

I would like to record the user's interaction in my Java Applet as a video to send (potentially stream) to my server with the intention of uploading to Youtube (or similar). A high frame-rate is not required (a couple frames per second is sufficient).

Minimizing the bandwidth used is preferred, so sending jpeg snapshots to the server and encoding server-side is my last resort.

Are there any lightweight Java video encoding libraries available that don't require native code?

A: 

Why do you need to send the images or video form directly? Sounds like a big bandwidth expense. Just serialize and send the stream of UI events with timestamps, and reconstruct what the user should be seeing on your server later (some visual details may depend on the user's machine/setup, but your applet ain't gonna be able to get to them decently anyway).

Alex Martelli
Alex: This is also an option I am exploring. With the computation and memory requirements of the applet, I'm not actually sure which would be a larger expense, the ~10MB bandwidth of a youtube quality video, or the computing power to recreate the user's interaction server-side.
Marcello Bastea-Forte
+1  A: 

I'm new to java so don't take this to seriously :)

I guess a good start with video encoding in java is Java Media Framework. I haven't tried it, so I don't know what's they're support on flv encoding.

Since Flash Media Server is commercial, couldn't you use Red5 ? You would have a swf, not an applet, but you will get a broader percentage of viewers since Flash Player is pretty wide spreaded.

And Alex has a good point, since you need to upload the video to youtube, why not use they're API ?

hth

George Profenza
George: I have worked with red5 in the past, but I can't remember if it had the capacity to generate content itself, or simply serve it to/receive it from Flash clients. I will have to explore JMF...
Marcello Bastea-Forte
A: 

Xuggler can be used to encode pretty much any format from Java, but it requires a native component to be installed with it. There isn't an applet version available in the easy to use download, but some users have built custom versions of FFmpeg and Xuggler that they have used in downloadable applications. Try asking on the xuggler-users user group to see if others will help.

Xuggle