create simple pipeline receive udpsrc rtp stream and send rtsp

Felipe Mogollon fmogollon at vicomtech.org
Wed Jun 1 05:04:58 PDT 2011


Hi to all.

We have solved this issue modifying gstreamer rtsp server:

We have a rtsp server which streams video that is received from rtp
and saves it simultaneously to a temp file:

           gst_rtsp_media_factory_set_launch (factory,     "gstrtpbin
name=rtpbin udpsrc port=5000 !
application/x-rtp,media=video,clock-rate=90000,encoding-name=H264 !
rtpbin.recv_rtp_sink_0   rtpbin. ! rtph264depay byte-stream=true
name=videodepay ! queue ! tee name=videotee ! queue ! rtph264pay
name=pay0 pt=96  udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0
rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=127.0.0.1 sync=false
async=false udpsrc name=audioudpsrc port=5002 ! application/x-rtp,
media=(string)audio, clock-rate=(int)22050,
encoding-name=(string)MPEG4-GENERIC, encoding-params=(string)1,
streamtype=(string)5, profile-level-id=(string)2,
mode=(string)AAC-hbr, config=(string)1388, sizelength=(string)13,
indexlength=(string)3, indexdeltalength=(string)3,
ssrc=(uint)3831044409, payload=(int)96, clock-base=(uint)3295317201,
seqnum-base=(uint)50289 ! rtpbin.recv_rtp_sink_1 rtpbin. !
rtpmp4gdepay ! queue ! tee name=audiotee ! queue ! rtpmp4gpay
name=pay1 pt=97 audiotee. ! decodebin ! lame ! flvmux name=muxer !
filesink location=/tmp/video.flv videotee. ! queue ! muxer. ");

We didn't get the caps when we made  the  rtph264depay  ! rtph264pay
name=pay0 pt=96

We solved it hardcoding the  rtsp-sdp.c file with our rtp received caps:

I mean:
    if(stream->caps==NULL)
    {
        g_warning("NO CAPS");

        stream->caps=gst_caps_from_string("application/x-rtp,
media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, ssrc=(uint)3142824526, payload=(int)96,
clock-base=(uint)1706805505, seqnum-base=(uint)54578");

}

Hope it helps.

Regards




On Fri, May 13, 2011 at 2:04 PM, MATTIAS BARTHEL <barthel at tid.es> wrote:
> Hombre, Angel!
> K tal?
> Un abrazo,
> Mattias
>
> Sent from my iPhone
> On May 13, 2011, at 13:53, "Angel Martin" <amartin at vicomtech.org> wrote:
>
> Dear all,
>
> I have the same problem.
>
> It is not possible to publish an RTSP stream from an udpsrc without
> transcoding/reencoding the rtp source stream?
>
> Best Regards,
>
> Angel
>
>
> 2011/3/10 Morris Ford <morrishford at gmail.com>
>>
>> Here is the debug output:
>> morrisford at ubuntu:~/gst-rtsp-server/gst-rtsp-0.10.7/examples$
>> ./test-launch --gst-debug=2 "( udpsrc port=5000 caps=\"application/x-rtp,
>> media=\(string\)video, clock-rate=\(int\)90000,
>> encoding-name=\(string\)H264,  payload=\(int\)96, ssrc=\(guint\)2396357661\"
>> ! rtph264depay ! rtph264pay name=pay0 pt=96 )"
>> 0:00:11.641343170  5193  0x8667008 WARN               rtspmedia
>> rtsp-media.c:806:alloc_udp_ports: multiudpsink version found without
>> send-duplicates property
>> 0:00:11.645912928  5193  0x8667008 WARN                     bin
>> gstbin.c:2330:gst_bin_do_latency_func:<media-pipeline> failed to query
>> latency
>> ** (lt-test-launch:5193): WARNING **: ignoring stream 0 without media type
>>
>> On Thu, Mar 10, 2011 at 1:28 AM, Marco Ballesio <gibrovacco at gmail.com>
>> wrote:
>>>
>>> Very late (and short) reply. I'm sorry I didn't remember that you were
>>> using the rtsp server. Could you please post the debug log for the
>>> failing cases?
>>>
>>> Regards
>>>
>>> On Fri, Mar 4, 2011 at 2:40 PM, Morris Ford <morrishford at gmail.com>
>>> wrote:
>>> > I did gst-inspect on the pay and depay elements and the depay sources
>>> > exactly the same thing that the pay sinks so I assumed that the two
>>> > should
>>> > talk. My understanding is that the gst-rtsp-server code in
>>> > test-launch.c has
>>> > the rest of what is needed to make the pipeline work.
>>> > Morris
>>> >
>>> > On Fri, Mar 4, 2011 at 3:02 AM, Marco Ballesio <gibrovacco at gmail.com>
>>> > wrote:
>>> >>
>>> >> Hi,
>>> >>
>>> >> On Mon, Feb 28, 2011 at 10:43 PM, Morris Ford <morrishford at gmail.com>
>>> >> wrote:
>>> >> > In my search to create this pipeline it would seem to me that I
>>> >> > could
>>> >> > connect the depay and pay elements together such as:
>>> >> > ./test-launch "( udpsrc port=5000 caps=\"application/x-rtp,
>>> >> > media=\(string\)video, clock-rate=\(int\)90000,
>>> >> > encoding-name=\(string\)H264,  payload=\(int\)96,
>>> >> > ssrc=\(guint\)2396357661,
>>> >> > clock-base=\(guint\)2297066863, seqnum-base=\(guint\)49439\" !
>>> >> > rtph264depay
>>> >> > ! rtph264pay name=pay0 pt=96 )"
>>> >>
>>> >> looks like you're missing sink elements. Depending on what you want
>>> >> you mean for "making it fly" it might already be flying or not ;).
>>> >>
>>> >> Regards
>>> >>
>>> >> > This doesn't work but it seems like it should. What do I need
>>> >> > between
>>> >> > the
>>> >> > depay and pay to make it fly? Is there an even simpler pipe that
>>> >> > would
>>> >> > achieve the desired results?
>>> >> > Morris
>>> >> > _______________________________________________
>>> >> > gstreamer-devel mailing list
>>> >> > gstreamer-devel at lists.freedesktop.org
>>> >> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>> >> >
>>> >> >
>>> >> _______________________________________________
>>> >> gstreamer-devel mailing list
>>> >> gstreamer-devel at lists.freedesktop.org
>>> >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>> >
>>> >
>>> > _______________________________________________
>>> > gstreamer-devel mailing list
>>> > gstreamer-devel at lists.freedesktop.org
>>> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>> >
>>> >
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
>
>
> --
>
> Ángel Martín Navas
> Investigador / Researcher
> Televisión Digital y Servicios Multimedia / Digital TV & Multimedia Services
>
> Vicomtech - Visual Interaction Communication Technologies
>
> Mikeletegi Pasealekua, 57 - Parque Tecnológico
> 20009 Donostia - San Sebastián - Spain
> Tel: +[34] 943 30 92 30
> Fax: +[34] 943 30 93 93
> e-mail: amartin at vicomtech.org
>
> www.vicomtech.org
>
> *** member of IK4 Research Alliance ****
> www.ik4.es
> *** member of GraphicsMedia.net ****
>
> www.graphicsmedia.net
>
>
>
> -----------------------------------------------------
> Vicomtech is an ISO 9001:2000 certified institute
> -----------------------------------------------------
>
>
> Este mensaje se dirige exclusivamente a su destinatario.
> La información incluida en el presente correo es confidencial sometida a
> secreto profesional, especialmente en lo que respecta a los datos de
> carácter personal, cuya divulgación está prohibida, en virtud de la
>
> legislación vigente. Si usted no es el destinatario legítimo y lo ha
> recibido por error o tiene conocimiento del mismo por cualquier motivo,
> le rogamos que nos lo comunique por este medio y proceda a destruirlo o
>
> borrarlo. En todo caso abstengase de utilizar, reproducir, alterar,
> archivar o comunicar a terceros el presente mensaje así como los ficheros
> anexos, todo ello bajo pena de incurrir en responsabilidades legales.
>
> Cualquier opinión contenida en este correo es exclusiva de su autor y no
> representa necesariamente la opinión de ASOCIACIÓN CENTRO DE TECNOLOGÍAS
> DE INTERACCIÓN VISUAL Y COMUNICACIONES VICOMTECH (en adelante Vicomtech-IK4)
>
> El emisor no garantiza la integridad, rapidez o seguridad del presente
> correo,
> ni se responsabiliza de posibles perjuicios derivados de la captura,
> incorporaciones de virus o cualesquiera otras manipulaciones efectuadas por
> terceros.
>
> Con motivo de la entrada en vigor de la Ley 34/2002, de 11 de julio, de
> Servicios de la Sociedad de la Información y de Comercio Electrónico, le
> informamos que pueden revocar en cualquier momento, de forma sencilla y
> gratuita,
>
> el consentimiento para la recepción de mensajes de vicomtech.org en
> info.lopd at vicomtech.org.
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> ________________________________
> Este mensaje se dirige exclusivamente a su destinatario. Puede consultar
> nuestra política de envío y recepción de correo electrónico en el enlace
> situado más abajo.
> This message is intended exclusively for its addressee. We only send and
> receive email on the basis of the terms set out at.
> http://www.tid.es/ES/PAGINAS/disclaimer.aspx
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>


More information about the gstreamer-devel mailing list