<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<br>It still did not work. Looks like it does not like gst-launch.<br>All I am trying to do is to open a webpage (IP address) of a camera.<br>I am not able to do so far. <br><br>sample code:<br><br>#include <gst/gst.h><br><br>int main(int argc, char *argv[]) {<br> GstElement *pipeline;<br> GstBus *bus;<br> GstMessage *msg;<br> <br>// /* Initialize GStreamer */<br> gst_init (&argc, &argv);<br><br> // data.rtspsrc = gst_element_factory_make("rtspsrc",NULL);<br>// /* Build the pipeline */<br> <br> pipeline = gst_parse_launch ("playbin2 uri=rtsp://172.31.11.141/axis-media/media.amp?videocodec=h264", NULL);<br> //pipeline = gst_parse_launch ("playbin2 uri=rtsp://172.31.11.141:8554", NULL);<br> //pipeline = "uri=rtsp://172.31.11.141/axis-media/media.amp?videocodec=h264";<br> //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);<br> <br> //gst-launch rtspsrc location=rtsp://$RTSP_IP/test ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false<br> //gst_parse_launch rtspsrc location= rtsp://172.31.11.141/test ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false<br><br>// <br>// /* Start playing */<br> gst_element_set_state (pipeline, GST_STATE_PLAYING);<br>// <br>// /* Wait until error or EOS */<br> bus = gst_element_get_bus (pipeline);<br> msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_EOS);<br>// <br>// /* Free resources */<br> if (msg != NULL)<br> gst_message_unref (msg);<br> gst_object_unref (bus);<br> gst_element_set_state (pipeline, GST_STATE_NULL);<br> gst_object_unref (pipeline);<br> system("PAUSE");<br> return 0;<br>}<br><br>Any help will be appreciated.<br>regards<br>..manny<br><br><div>> Subject: Re: access camera with assigned IP address<br>> From: tim@centricular.com<br>> To: gstreamer-devel@lists.freedesktop.org<br>> Date: Sat, 10 May 2014 12:34:05 +0100<br>> <br>> On Fri, 2014-05-09 at 20:44 -0700, Manir wrote:<br>> <br>> Hi,<br>> <br>> > I am new to gstreamer and trying to develop live video streaming<br>> > application with gstreamer 1.2.4 and BOSCH DINION 1080P HDR camera.<br>> > I have installed the camera and already accessed through browser using<br>> > its camera's default IP address (192.168.0.1).<br>> > All I am trying to do is access or connect to that IP address and see<br>> > or play the live video. So I used one of basic tutorial programme with<br>> > modification<br>> > to achieve that but it is not working at all.<br>> > I guess I just do not know how to create "pipeline" with IP address<br>> > for live video. <br>> > I will appreciate any help to achieve this goal. <br>> <br>> Maybe try with gst-launch-1.0 first. Does this work:<br>> <br>> gst-launch-1.0 playbin uri=rtsp://...<br>> <br>> Note that if you're using 1.x it should be 'playbin', not 'playbin2'.<br>> <br>> Cheer<br>> -Tim<br>> <br>> > Best regards<br>> > manny..<br>> > Costa Mesa, CA<br>> > <br>> > My code sample as below: (Pls help to access camera with assigned IP<br>> > address. :)<br>> > <br>> > #include <gst/gst.h><br>> > // <br>> > int main(int argc, char *argv[]) {<br>> > GstElement *pipeline;<br>> > //GstElement *rtspsrc;<br>> > GstBus *bus;<br>> > GstMessage *msg;<br>> > // <br>> > // /* Initialize GStreamer */<br>> > gst_init (&argc, &argv);<br>> > // <br>> > // data.rtspsrc = gst_element_factory_make("rtspsrc",NULL);<br>> > // /* Build the pipeline */<br>> > <br>> > g_object_set( pipeline, "location", "rtsp://172.31.11.145/?h26x=4<br>> > &inst=2", "latency", 0, "buffer-mode", 0, "debug", FALSE,<br>> > "rtp-blocksize", 65536, NULL);<br>> > <br>> > //pipeline = gst_parse_launch ("playbin2<br>> > uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);<br>> > <br>> > //pipeline =<br>> > "uri=rtsp://172.31.11.141/axis-media/media.amp?videocodec=h264";<br>> > //pipeline = gst_element_factory_make("rtspsrc", NULL);<br>> > <br>> > //pipeline = gst_parse_launch ("playbin2<br>> > rtsp=rtsp://172.31.11.145/?h26x=4", NULL);<br>> > //gst-launch rtspsrc location=rtsp://$RTSP_IP/test ! rtph264depay !<br>> > ffdec_h264 ! xvimagesink sync=false<br>> > //gst_parse_launch rtspsrc location= rtsp://172.31.11.141/test !<br>> > rtph264depay ! ffdec_h264 ! xvimagesink sync=false<br>> > <br>> > // <br>> > // /* Start playing */<br>> > gst_element_set_state (pipeline, GST_STATE_PLAYING);<br>> > // <br>> > // /* Wait until error or EOS */<br>> > bus = gst_element_get_bus (pipeline);<br>> > msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,<br>> > GST_MESSAGE_EOS);<br>> > // <br>> > // /* Free resources */<br>> > if (msg != NULL)<br>> > gst_message_unref (msg);<br>> > gst_object_unref (bus);<br>> > gst_element_set_state (pipeline, GST_STATE_NULL);<br>> > gst_object_unref (pipeline);<br>> > system("PAUSE");<br>> > return 0;<br>> > }<br>> > <br>> > _______________________________________________<br>> > gstreamer-devel mailing list<br>> > gstreamer-devel@lists.freedesktop.org<br>> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br>> <br>> -- <br>> Tim Müller, Centricular Ltd - http://www.centricular.com<br>> <br>> _______________________________________________<br>> gstreamer-devel mailing list<br>> gstreamer-devel@lists.freedesktop.org<br>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br></div> </div></body>
</html>