Livestreaming: IPCapture (sdp file)

edited June 2016 in Library Questions

Basically, what I wanted to do is perform a livestreaming with IPCapture function in Processing. I have an external camera attached on a drone. My pc is connected to the controller's wifi. This is what i do normally (streaming). I open a cmd and nc to ""10.1.1.1 5502". After that, I will open the sdp file with vlc. It works perfectly. Instead of using these methods, I thinking using Processing to stream my video.

This is the sdp file code:

c=IN IP4 10.1.1.1

m=video 5600 RTP/AVP 96

a=rtpmap:96 H264/90000

t=0 0

This is my IPCapture code: import ipcapture.*;

IPCapture cam;

void setup() {
  size(720,520);
  cam = new IPCapture(this, "http://" + "10.1.1.1:5502/", "root", "admin");
  cam.start();

}

void draw() {
  if (cam.isAvailable()) {
    cam.read();
    image(cam,0,0);
  }
}

void keyPressed() {
  if (key == ' ') {
    if (cam.isAlive()) cam.stop();
    else cam.start();
  }
}

I was able to run the code, but it only show a grey empty screen with no video. What's wrong with my code, in the console no error message. How to link the sdp file with processing? Thx.

Sign In or Register to comment.