We're currently busy with a project in which we are trying to play a video file in a window from a live stream in Java. We've already managed to capture the stream via a Socket object using an InputStreamReader.
The next step is using an existing library (Xuggler) or code to decode this stream and display the contents (video) in a simple window.
The stream originates from the Parrot AR Drone 2.0 via IP address 192.168.1.1:5555. That's where we got stuck. The code we're trying to use is the DecodeandPlayVideo example found here:
Now it should be possible to use this with an inputstream but it should of course be in the right format. Is there some way you can help us do this?
Oke we solved the problem:
First we make a TCP connection to the drone:
Our class is Runnable what means that we also have a method run() In this method we send a video_enable command and we also disable the dynamic video bitrate by sending this command: video:bitrate_ctrl_mode 0;
Our decode() method can be found here: https://github.com/xuggle/xuggle-xuggler/blob/master/src/com/xuggle/xuggler/demos/DecodeAndPlayVideo.java
In this decode method we have changed this:
To this:
That's all!!
Copied from Edit in question: