Hi all I have the following problem. With a gstreamer pipe I send rtp packets from my ip port for example 5010 to another IP for example to port 15000. Besides the other IP sends to me at port 5010 another stream.
In order to receive and to decode this stream I launch another pipe, but I receive the error that the address is already in use the pipe is gst-launch -v gstrtpbin name=rtpbin latency=200 udpsrc caps=application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,payload=99,reuse=true, port=5010 ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! autovideosink udpsink host=127.0.0.1 Is there a way to solve the problem? To have two pipe that works togheter? G. |
With the sockfd on udpsrc and udpsink you can share the same socket
for sending and receiving, see rtspsrc for how this can be done. Wim On Wed, Feb 2, 2011 at 7:04 PM, giorgino <[hidden email]> wrote: > > Hi all I have the following problem. With a gstreamer pipe I send rtp packets > from my ip port for example 5010 to another IP for example to port 15000. > Besides the other IP sends to me at port 5010 another stream. > In order to receive and to decode this stream I launch another pipe, but I > receive the error that the address is already in use > the pipe is > > gst-launch -v gstrtpbin name=rtpbin latency=200 udpsrc > caps=application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,payload=99,reuse=true, > port=5010 ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! autovideosink > udpsink host=127.0.0.1 > > Is there a way to solve the problem? To have two pipe that works togheter? > > G. > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/address-already-in-use-98-tp3255189p3255189.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by giorgino
> Is there a way to solve the problem? To have two pipe that works togheter?
A piece of example code where the socket is req'd and set again: gboolean gst_vbcp_connect_udp (GstVbcpSrcBin * decoder, gchar * addr, guint port) { gchar *uri; GST_DEBUG_OBJECT(decoder, "connecting to the vbcp server"); g_return_val_if_fail (decoder != NULL, FALSE); g_return_val_if_fail (decoder->fd == -1, FALSE); g_return_val_if_fail (addr != NULL, FALSE); g_return_val_if_fail (decoder->appsink != NULL, FALSE); g_return_val_if_fail (decoder->appsrc != NULL, FALSE); g_return_val_if_fail (decoder->udpsrc == NULL, FALSE); g_return_val_if_fail (decoder->udpsink == NULL, FALSE); uri = g_strdup_printf ("udp://%s:%d", addr, port); GST_DEBUG_OBJECT(decoder, "creating %s.", uri); decoder->udpsink = gst_element_make_from_uri (GST_URI_SINK, uri, NULL); g_free (uri); g_object_set (G_OBJECT (decoder->udpsink), "closefd", FALSE, NULL); gst_bin_add( GST_BIN_CAST(decoder), decoder->udpsink); gst_element_sync_state_with_parent(decoder->udpsink); decoder->udpsrc = gst_element_factory_make("udpsrc", NULL); gst_bin_add( GST_BIN_CAST(decoder), decoder->udpsrc); g_object_get (G_OBJECT (decoder->udpsink), "sock", &decoder->fd, NULL); GST_DEBUG_OBJECT (decoder, "UDP sink has sock %d", decoder->fd); g_object_set (G_OBJECT (decoder->udpsrc), "sockfd", decoder->fd, NULL); /* link the elements together */ gst_element_link_many(decoder->appsrc, decoder->udpsink, NULL); gst_element_link_many(decoder->udpsrc, decoder->appsink, NULL); gint socketfd; g_object_get (G_OBJECT (decoder->udpsrc), "sockfd", &socketfd, NULL); GST_DEBUG_OBJECT (decoder, "UDP src has sock %d", socketfd); gst_element_sync_state_with_parent(decoder->appsrc); gst_element_sync_state_with_parent(decoder->udpsrc); gst_element_sync_state_with_parent(decoder->appsink); return TRUE; } -- greetz, marc When speculation has done its worst, two plus two still equals four. -- S. Johnson crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel signature.asc (204 bytes) Download Attachment |
Thanks to all for the answers.
I like to explain better the problem. This is my sending pipe gst-launch v4l2src ! video/x-raw-yuv,width=320,height=240,framerate=15/1 ! queue ! videorate ! ffmpegcolorspace ! x264enc bitrate=128 tune=zerolatency ! rtph264pay pt=99 ! udpsink host=192.168.100.194 port=12650 My receiving pipe is gst-launch -v gstrtpbin name=rtpbin udpsrc caps=application/x-rtp,media=video,clock-rate=90000,encoding-name=H264,payload=99,reuse=true port=49634 ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! autovideosink If I put in another PC inside the lan the corrispetive pipes in order to receive the stream at port 12650 and to send to 192.168.100.196 to port 49634 everything works. When I work with a third extern server (a SIP Server), and I start before the sending pipe and after I try to start the receiving pipe I obtain the following message (Excuse if is in Italian) but I try to translate Impostazione della pipeline a PAUSED ... ERRORE: la pipeline non vuole mettersi in pausa. ERRORE: dall'elemento /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Impossibile ottenere/regolare le impostazioni dalla risorsa. Informazioni di debug aggiuntive: gstudpsrc.c(945): gst_udpsrc_start (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: bind failed -1: Indirizzo giĆ in uso (98) Impostazione della pipeline a NULL ... /GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps = NULL Esecuzione di free sulla pipeline... The important information is the bind failed and address already in use I read your answers but I can't figure out how I can solve my problem, setting other parameters in the pipe. Please help me, because for the moment alone I'm not able to find the solution. Have a nice day G. |
I have an update. Previously I said that
>I like to explain better the problem. This is my sending pipe >gst-launch v4l2src ! video/x-raw-yuv,width=320,height=240,framerate=15/1 ! queue ! videorate ! ffmpegcolorspace ! >x264enc bitrate=128 tune=zerolatency ! rtph264pay pt=99 ! udpsink host=192.168.100.194 port=12650 >My receiving pipe is >gst-launch -v gstrtpbin name=rtpbin udpsrc caps=application/x-rtp,media=video,clock >rate=90000,encoding->name=H264,payload=99,reuse=true port=49634 ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! >autovideosink >If I put in another PC inside the lan the corrispetive pipes in order to receive the stream at port 12650 and to send to >192.168.100.196 to port 49634 everything works. It is not true. It doesn't work and give me the same error bind failed -1; Address already in use. So the problem is that in the same pc the two pipe have to work with the same port. How it is possible? Please help me is really important. G. |
Try setting the socket option with SO_REUSEADDR
------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by giorgino
<snip>
> bind failed -1; Address already in use. > > So the problem is that in the same pc the two pipe have to work with the > same port. How it is possible? > Please help me is really important. You could try to reread and understand the suggestions made by me and the example code presented by Mark above... Wim > > G. > > > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/address-already-in-use-98-tp3255189p3258150.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |