Hi!<br><br>I'm using Gstreamer to save RTP audio streams to wav files. This works in<br>general, however, I need to deal with packet loss and in this case the pipeline<br>I'm currently using fails:<br><br> filesrc location=foobar.pcap ! pcapparse<br>
! "application/x-rtp, payload=0, clock-rate=8000"<br> ! gstrtpjitterbuffer ! rtppcmudepay ! mulawdec ! audioconvert<br> ! audioresample ! wavenc ! filesink location=foobar.wav<br><br>This produces audio files that are shorter than the original RTP stream,<br>
e.g. for a certain amount of consecutively lost packets a second of audio is<br>missing from the wav file. For a real audio sink this doesn't happen as it<br>plays audio when something is available, the filesink however -- I assume --<br>
writes data sequentially and only when data is actually available. By the<br>way: the effect is the same for udpsrc as it is for filesrc+pcapparse.<br><br>I tried the above pipeline with filesink's sync property set to true ([1]), this<br>
didn't make any difference. I read somewhere in the Gstreamer docs that the<br>global clock is [usually] dependent on the sink element. Do I need to reverse<br>this and make the sink's clock dependent on the source's clock?<br>
<br>1. <<a href="http://www.gstreamer.net/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSink.html#gst-base-sink-set-sync">http://www.gstreamer.net/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSink.html#gst-base-sink-set-sync</a>><br>
<br>Maybe I'm totally off in this regard and there is no implicit way to achieve<br>what I need. Ultimately some element in the pipeline needs to produce<br>"silence/empty/zero data" if its input buffer is empty. Is there an explicit<br>
way (helper element/attribute) to do this?<br><br>Thorsten<br>