Using udpsrc as source in rtsp-server

Krzysztof Konopko krzysztof.konopko at youview.com
Mon Dec 3 01:58:43 PST 2012


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
> 
> 



More information about the gstreamer-devel mailing list