Using rtpjitterbuffer to handle RTP packets based on their timestamp only (mode 0)

Andrea Lo Pumo alopumo at movia.biz
Thu Oct 3 07:50:18 UTC 2019


P.S. here attached the source code of rtpfilesrc

Il giorno mer 2 ott 2019 alle ore 18:14 Andrea Lo Pumo <alopumo at movia.biz>
ha scritto:

> I have a dump of RTP traffic (a single ssrc stream) and I would like to
> decode it with gstreamer.
> What I am trying works, but it fails if there are jumps in the timestamps
> because there is silence in between (no packets sent during the silence).
> The result is an audio without the right silence.
> Note that the RTP timestamp advances correctly, so one knows how much time
> passed before the jump and after it.
> Thus, I was trying "rtpjitterbuffer mode=0" however, when I use mode=0, I
> get the following:
> ....
> INFO         rtpjitterbuffer
> gstrtpjitterbuffer.c:2559:calculate_expected:<rtpjitterbuffer0> lost
> packets (1, #23086->#23086) duration too large 0:00:00.800000000 >
> 0:00:00.200000000, consider 0 lost (0:00:00.200000000)
> INFO         rtpjitterbuffer
> gstrtpjitterbuffer.c:2559:calculate_expected:<rtpjitterbuffer0> lost
> packets (2, #23112->#23113) duration too large 0:00:00.740000000 >
> 0:00:00.200000000, consider 1 lost (0:00:00.293333332)
> ...
> INFO                 basesrc
> gstbasesrc.c:2839:gst_base_src_loop:<rtpfilesrc0> pausing after
> gst_base_src_get_range() = eos
> INFO                    task gsttask.c:316:gst_task_func:<rtpfilesrc0:src>
> Task going to paused
>
> and at this point it remains blocked.
>
> This is the pipeline I am using:
>
>     gst-launch-1.0 rtpfilesrc location=/tmp/input.rtp !
> "application/x-rtp, media=(string)audio, clock-rate=(int)8000,
> encoding-name=(string)PCMA" ! rtpjitterbuffer mode=0
> max-rtcp-rtp-time-diff=-1 ! decodebin ! wavenc ! filesink
> location=/tmp/out.wav
>
> Rtpfilesrc is a plugin I have written that reads an RTP dump and becomes a
> source of UDP packets. I used PushSrc as the base class and have overridden
> "fill".
> In init() I am using the following configuration:
>   gst_base_src_set_live (GST_BASE_SRC (rtpfilesrc), TRUE);
>   gst_base_src_set_format (GST_BASE_SRC (rtpfilesrc), GST_FORMAT_TIME);
>   // do not make rtpfilesrc set timestamps on outgoing buffers based on
> the running_time when they were captured
>   gst_base_src_set_do_timestamp (GST_BASE_SRC (rtpfilesrc), FALSE);
>
> What should I do?
>
> Thank you in advance.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191003/62ffb983/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstrtpfilesrc.c
Type: text/x-csrc
Size: 14870 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191003/62ffb983/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstrtpfilesrc.h
Type: text/x-chdr
Size: 1948 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191003/62ffb983/attachment-0001.h>


More information about the gstreamer-devel mailing list