Extracting audio from pcap and mixing them

Nicolas Dufresne nicolas at ndufresne.ca
Wed Jan 15 14:23:59 UTC 2020


Le mar. 14 janv. 2020 22 h 45, Juan F Gomez <carne.tremula at gmail.com> a
écrit :

> Hello List,
>
> I have a pcap file which contains two streams of g729 audio. I want to
> extract them and mix them. The problem is that one audio is shorter
> than the other by about 2 secs. When seeing the pcap in wireshark you
> can see that one of the streams starts earlier (like 5 seconds earlier
> than the other). When I mix them they both start at the same time and
> of course get out of sync. Here is the pipeline I am using:
>
> gst-launch-1.0 \
> filesrc location=test.pcap ! tee name=t ! \
> queue ! pcapparse dst-port=30100 ! "application/x-rtp, payload=18,
> clock-rate=8000" ! rtpg729depay ! avdec_g729 !\
> audiomixer name=mix ! wavenc ! filesink location=out.wav t. !\
> queue ! pcapparse dst-port=30200 ! "application/x-rtp, payload=18,
> clock-rate=8000" ! rtpg729depay ! avdec_g729 ! mix.
>

Each pcap element don't know about each other, so they probably assume
first buffer is time 0. To handle this, we'd need to use the same
pcapparse, but this is not supported by this simple element. Meanwhile, you
can use the ts-offset property.


> Any Ideas are welcome. Thanks
>
> JF
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200115/25f6a590/attachment.htm>


More information about the gstreamer-devel mailing list