access camera with assigned IP address

Tim Müller tim at centricular.com
Sat May 10 04:34:05 PDT 2014


On Fri, 2014-05-09 at 20:44 -0700, Manir wrote:

Hi,

> I am new to gstreamer and trying to develop live video streaming
> application with gstreamer 1.2.4 and BOSCH DINION 1080P HDR camera.
> I have installed the camera and already accessed through browser using
> its camera's default IP address (192.168.0.1).
> All I am trying to do is access or connect to that IP address and see
> or play the live video. So I used one of basic tutorial programme with
> modification
> to achieve that but it is not working at all.
> I guess I just do not know how to create "pipeline" with IP address
> for live video. 
> I will appreciate any help to achieve this goal. 

Maybe try with gst-launch-1.0 first. Does this work:

 gst-launch-1.0 playbin uri=rtsp://...

Note that if you're using 1.x it should be 'playbin', not 'playbin2'.

Cheer
 -Tim

> Best regards
> manny..
> Costa Mesa, CA
> 
> My code sample as below: (Pls help to access camera with assigned IP
> address. :)
> 
> #include <gst/gst.h>
> // 
> int main(int argc, char *argv[]) {
>   GstElement *pipeline;
>   //GstElement *rtspsrc;
>   GstBus *bus;
>   GstMessage *msg;
> //  
> //  /* Initialize GStreamer */
>   gst_init (&argc, &argv);
> //  
>  // data.rtspsrc = gst_element_factory_make("rtspsrc",NULL);
> //  /* Build the pipeline */
> 
>    g_object_set( pipeline, "location", "rtsp://172.31.11.145/?h26x=4
> &inst=2", "latency", 0, "buffer-mode", 0, "debug", FALSE,
> "rtp-blocksize", 65536, NULL);
> 
>   //pipeline = gst_parse_launch ("playbin2
> uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);
>  
>    //pipeline =
> "uri=rtsp://172.31.11.141/axis-media/media.amp?videocodec=h264";
>   //pipeline = gst_element_factory_make("rtspsrc", NULL);
>  
>   //pipeline = gst_parse_launch ("playbin2
> rtsp=rtsp://172.31.11.145/?h26x=4", NULL);
>   //gst-launch rtspsrc location=rtsp://$RTSP_IP/test ! rtph264depay !
> ffdec_h264 ! xvimagesink sync=false
>   //gst_parse_launch rtspsrc location= rtsp://172.31.11.141/test !
> rtph264depay ! ffdec_h264 ! xvimagesink sync=false
> 
> //  
> //  /* Start playing */
>   gst_element_set_state (pipeline, GST_STATE_PLAYING);
> //  
> //  /* Wait until error or EOS */
>   bus = gst_element_get_bus (pipeline);
>   msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
> GST_MESSAGE_EOS);
> //  
> //  /* Free resources */
>   if (msg != NULL)
>     gst_message_unref (msg);
>   gst_object_unref (bus);
>   gst_element_set_state (pipeline, GST_STATE_NULL);
>   gst_object_unref (pipeline);
>   system("PAUSE");
>   return 0;
> }
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list