How to create a video chat program in java without jmf?

I want to create a C / S chat program in java using a socket, and now I want to add the online video chat function to it. After google, I found jmf and followed some tutorials, but I don't like it very much because every client needs to install jmf and register a webcam (or other audio devices).

So, I am looking forward to an alternative lib without jmf and found libs like (juv, xuggle) and then it works well. Unfortunately, they can only control the webcam, cannot access the audio device.

Can someone give me some advice?

+3
source share
2 answers

-, GStreamer. , ( ).

, . , , , . Windows.

Send video:
gst-launch ksvideosrc ! queue ! video/x-raw-yuv,width=320,height=240,framerate=4/1 ! videorate ! videoscale ! ffmpegcolorspace ! queue ! smokeenc ! queue ! udpsink host=[TARGET_IP_ADDRESS] port=5000

Receive video:
gst-launch udpsrc port=5000 ! smokedec ! autovideosink

Send audio:
gst-launch audiotestsrc ! audioconvert ! audio/x-raw-int,channels=1,depth=16,width=16,rate=44100 ! rtpL16pay  ! udpsink host=[TARGET_IP_ADDRESS] port=5001

Receive audio:
gst-launch udpsrc port=5001 ! "application/x-rtp,media=(string)audio, clock-rate=(int)44100, width=16, height=16, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, channel-positions=(int)1, payload=(int)96" ! rtpL16depay ! audioconvert ! audioresample ! directsoundsink

:

GStreamer

Linux ksvideosrc v4l2src directsoundsink alsasink. gstreamer-java:

http://code.google.com/p/gstreamer-java/

:

GStreamer

Cheat Sheet

-

+4

All Articles