GStreamer + pcap SIP call
Жаров Александр Николаевич
anzharov at domclick.ru
Fri Jun 4 10:47:50 UTC 2021
Hi all,
I am using GStreamer to create a video file from a pcap dump file that contains RTP traffic of SIP calls (2 or 2+ legs).
For example,
“call123-media.pcap” with 2 legs contains only SIP call media (OPUS + VP8 RTP packets).
Pcap captured on one server.
Every leg has 1 audio + 2 video (videoIN + videoOUT) streams.
Streams start and end at the same time (after trimming the pcap file).
I am using the following pipeline for converting:
gst-launch-1.0 videomixer name=m background=1 \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 \
sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=480 ! queue ! x264enc tune=zerolatency pass=17 bitrate=768 ! queue \
! mp4mux name=avMux faststart=true ! queue ! filesink location=call123-media.mp4 \
rtpbin name=rtpbin \
filesrc location=call123-media.pcap ! queue ! tee name=pcapTee \
pcapTee. ! queue ! pcapparse src-port=16242 ! application/x-rtp,media=audio,clock-rate=48000,encoding-name=OPUS ! rtpbin. \
pcapTee. ! queue ! pcapparse src-port=17234 ! application/x-rtp,media=audio,clock-rate=48000,encoding-name=OPUS ! rtpbin. \
pcapTee. ! queue ! pcapparse src-port=16268 ! application/x-rtp,media=video,clock-rate=90000,encoding-name=VP8 ! rtpbin. \
pcapTee. ! queue ! pcapparse src-port=17254 ! application/x-rtp,media=video,clock-rate=90000,encoding-name=VP8 ! rtpbin. \
\
rtpbin. ! rtpjitterbuffer ! rtpopusdepay ! opusdec ! audioconvert ! avenc_aac ! avMux.audio_0 \
rtpbin. ! rtpjitterbuffer ! rtpopusdepay ! opusdec ! audioconvert ! avenc_aac ! avMux.audio_1 \
rtpbin. ! rtpjitterbuffer ! rtpvp8depay ! vp8dec ! videoscale ! video/x-raw,width=640,height=480 ! m. \
rtpbin. ! rtpjitterbuffer ! rtpvp8depay ! vp8dec ! videoscale ! video/x-raw,width=640,height=480 ! m.
As a result, I get two video streams, where the first is not started simultaneously with the second.
I am getting following results:
1. the first stream starts 5 seconds after the start of the second (5 seconds of black screen)
2. the second stream ends 5 seconds after the end of the first
3. video streams are not synchronous
What wrong with my pipeline?
How can I fix that?
I tried adding queues but it didn't help.
--
Thanks in advance,
Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210604/289defd8/attachment-0001.htm>
More information about the gstreamer-devel
mailing list