Extracting audio from pcap and mixing them

Juan F Gomez carne.tremula at gmail.com
Wed Jan 15 02:33:02 UTC 2020


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.

Any Ideas are welcome. Thanks

JF


More information about the gstreamer-devel mailing list