GStreamer + pcap SIP call

Жаров Александр Николаевич anzharov at domclick.ru
Fri Jun 4 14:19:52 UTC 2021


Thanks for your reply!

I am trying to fetch 4 rtp sessions from a pcap file in the same pipeline simultaneously.
What should I do to keep all sessions in sync?

Thanks in advance,
Alexander

From: Nathan Stratton <nathan at vocinity.com>
Date: Friday, 4 June 2021, 5:13 PM
To: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
Cc: Жаров Александр Николаевич <anzharov at domclick.ru>
Subject: Re: GStreamer + pcap SIP call

I use:

gst-launch-1.0 filesrc location=out.pcap ! pcapparse dst-port=24384 caps="application/x-rtp,media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP8-DRAFT-IETF-01, payload=(int)96" ! rtpvp8depay ! webmmux ! filesink location=out.webm

><>
Nathan Stratton
Founder, CTO
Vocinity, Inc.


On Fri, Jun 4, 2021 at 6:58 AM Жаров Александр Николаевич via gstreamer-devel <gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>> wrote:
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

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org<mailto: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/20210604/b31d3f23/attachment-0001.htm>


More information about the gstreamer-devel mailing list