Using udpsrc as source in rtsp-server

Damiano Pinarello damiano.pinarello at bticino.it
Mon Dec 3 02:59:47 PST 2012


Hi Kris,

I have already tried to replace caps as you advise to me, but rtsp-server return the same error.
I tried all combinations:

- caps=\"application/x-rtp,media=(string)video,encoding-name=(string)H264\"
- caps=application/x-rtp,media=(string)video,encoding-name=(string)H264
- caps='application/x-rtp,media=(string)video,encoding-name=(string)H264'

but nothing change.

Hi,
Damiano


On 09:58 Mon 03 Dec     , Krzysztof Konopko wrote:
> Hi Damiano,
> 
> I guess you need to get rid of quotes around the caps value in your
> REALTIME stream pipeline. They are required on the command line and get
> consumed by the shell when constructing argument list.
> 
> Try replacing
> 
> "
> caps=\"application/x-rtp,media=(string)video,encoding-name=(string)H264\" !"
> 
> with
> 
> " caps=application/x-rtp,media=(string)video,encoding-name=(string)H264 !"
> 
> HTH,
> Kris
> 
> On 03/12/12 09:31, Damiano Pinarello wrote:
> > Hi all,
> > 
> > I'm working on IP camera based on DM365.
> > I'm using the following pipeline to strem video on 127.0.0.1 and record it at the same time:
> > 
> >   gst-launch \
> >     v4l2src always-copy=FALSE ! \
> >     'video/x-raw-yuv,format=(fourcc)NV12,width=640,height=480,framerate=(fraction)30/1' ! \
> >     TIVidenc1 bitRate=6000000 encodingPreset=2 codecName=h264enc engineName=codecServer contiguousInputFrame=TRUE \
> >     ! queue ! tee name=t_vid ! \
> >     queue ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=5000 t_vid. ! \
> >     queue ! valve drop=true ! filesink location=/var/tmp/sample.264
> > 
> > About filesink tree, I use valve element to decide when start/stop video recording.
> > 
> > I want to strem video via rtsp-server into three flow: the first is realtime flow, the second is the first delayed of Xsecs
> > and the third is a play of a recording video.
> > 
> >   GstQueue_r.t_time = (guint64)0;
> >   GstQueue_r.s_buffers = (guint)0;
> >   GstQueue_r.s_bytes = (guint)0;
> >   GstQueue_r.s_time = (guint64)0;
> > 
> >   // REALTIME stream
> >   pipeline = g_strdup_printf("( "
> >     " udpsrc port=5000"
> >     " caps=\"application/x-rtp,media=(string)video,encoding-name=(string)H264\" !"
> >     " queue min-threshold-time=%lld max-size-buffers=%d max-size-bytes=%d max-size-time=%lld ! rtph264pay pt=96 name=pay0"
> >     ")", (guint64)GstQueue_r.t_time, (guint)GstQueue_r.s_buffers, (guint)GstQueue_r.s_bytes, (guint64)GstQueue_r.s_time);
> >   gst_rtsp_media_factory_set_launch(GST_RTSP_MEDIA_FACTORY(realtime), pipeline);
> > 
> >   GstQueue_d.t_time = (guint64)10000000000ULL;
> >   GstQueue_d.s_buffers = (guint)0;
> >   GstQueue_d.s_bytes = (guint)0;
> >   GstQueue_d.s_time = (guint64)0;
> > 
> >   // DELAYED stream
> >   pipeline = g_strconcat("( "
> >     " rtspsrc location=rtsp://127.0.0.1:3051/realtime !"
> >     " queue min-threshold-time=%lld max-size-buffers=%d max-size-bytes=%d max-size-time=%lld ! rtph264pay pt=96 name=pay1"
> >     ")", (guint64)GstQueue_d.t_time, (guint)GstQueue_d.s_buffers, (guint)GstQueue_d.s_bytes, (guint64)GstQueue_d.s_time);
> >   gst_rtsp_media_factory_set_launch(GST_RTSP_MEDIA_FACTORY(delayed), pipeline);
> > 
> >   // RECORDED stream
> >   pipeline = g_strconcat("( "
> >     " filesrc location=/var/tmp/sample.264 !"
> >     " queue min-threshold-time=%lld max-size-buffers=%d max-size-bytes=%d max-size-time=%lld ! rtph264pay pt=96 name=pay2"
> >     ")", (guint64)GstQueue_r.t_time, (guint)GstQueue_r.s_buffers, (guint)GstQueue_r.s_bytes, (guint64)GstQueue_r.s_time);
> >   gst_rtsp_media_factory_set_launch(GST_RTSP_MEDIA_FACTORY(recorded), pipeline);
> > 
> > Every flow is mapped in a different url on the same rtsp-server:
> >  - rtsp://10.39.9.76:3051/reltime 
> >  - rtsp://10.39.9.76:3051/delayed 
> >  - rtsp://10.39.9.76:3051/recorded 
> > 
> > When I try to recive one video from my desktop with this pipeline:
> > 
> >   gst-launch -v rtspsrc location=rtsp://10.39.9.76:3051/realtime ! rtph264depay ! ffdec_h264 ! xvimagesink
> > 
> > the server return this kind of error that it's the same for every url:
> > 
> > ** (gst-player:1499): CRITICAL **: could not parse launch syntax ((  udpsrc port=5000 caps="application/x-rtp,media=(string)video,encoding-name=(string)H264" ! queue min-threshold-time=0 max-size-buffers=0 max-size-bytes=0 max-size-time=0 ! rtph264pay pt=96 name=pay0)): Unrecoverable syntax error while parsing pipeline (  udpsrc port=5000 caps="application/x-rtp,media=(string)video,encoding-name=(string)H264" ! queue min-threshold-time=0 max-size-buffers=0 max-size-bytes=0 max-size-time=0 ! rtph264pay pt=96 name=pay0)
> > 
> > I try to modify a sintax but I don't be able to solve it.
> > 
> > Anyone can help me?
> > 
> > Tnx in advance
> > 
> > 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 

***** Email confidentiality notice *****
This message and attachment are confidential and they also are legally privileged in accordance with the NDA.
If you have received this message in error, please notify us and remove it from your system.

--

Damiano PINARELLO
Embedded Software Developer
Office Phone: +(39) 031 653679 Ext. 4679
FAX phone: +(39) 031 653283
Street address: Via L. Manara 4, 22036 Erba (CO), Italy
Email: damiano.pinarello at bticino.it
WebSite: www.bticino.it

------------------------------------------------------------------------------
 Please consider your environmental responsibility before printing this Email
------------------------------------------------------------------------------
This message is confidential. It may also be privileged or otherwise protected
by law or legal rules. Should you have received this email by mistake please 
let us know by reply and then delete it from your system; you should not copy
it or disclose its contents to anyone.
All messages sent to and from [Enea] may be monitored to ensure compliance
with internal policies and to protect our business. Emails are not secure
and cannot be guaranteed to be error free as they can be intercepted, amended,
lost or destroyed, or contain viruses. Anyone who communicates with us by email
is taken to accept these risks.
------------------------------------------------------------------------------


Ce message, ainsi que tous les fichiers joints à ce message,
peuvent contenir des informations sensibles et/ ou confidentielles
ne devant pas être divulguées. Si vous n'êtes pas le destinataire
de ce message (ou que vous recevez ce message par erreur), nous
vous remercions de le notifier immédiatement à son expéditeur, et
de détruire ce message. Toute copie, divulgation, modification,
utilisation ou diffusion, non autorisée, directe ou indirecte, de
tout ou partie de ce message, est strictement interdite.

This e-mail, and any document attached hereby, may contain
confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any
unauthorized, direct or indirect, copying, disclosure, distribution
or other use of the material or parts thereof is strictly
forbidden.


More information about the gstreamer-devel mailing list