processing-video
processing-video copied to clipboard
rtspsrc. How to?
Hi, I need to port a project which succesfully runs on Praxislive to Processing, but I don't know how to write the pipeline to read a rtsp stream of a IP Camera using the new video library.
I've downloaded the latest 2.0 beta 4 version, but also looking into the source it isn't clear to me how to start the rtspsrc pipeline.
The command I use inside Praxis Live is this:
rtspsrc latency=0 buffer-mode=0 udp-buffer-size=400000 location="rtsp://192.168.1.11:554/user=admin&password=&channel=1&stream=0.sdp?real_stream" ! rtph264depay ! decodebin ! videocrop top=0 bottom=0
Can you help me?
Davide.
EDIT: I'm trying this:
import processing.video.*;
Capture cam;
void setup() {
size(640, 480);
cam = new Capture(this, 640, 480, "pipeline:rtspsrc ! rtph264depay ! decodebin");
cam.start();
}
void draw() {
if (cam.available() == true) {
cam.read();
}
image(cam, 0, 0, width, height);
}
those modules separated by "!" are accepted, but I don't know how to pass the location="xxx" property. in the source I can see in the initCustomPipeline() function the splitting procedure, but nothing refers to the property "location" argument.