depaying MPEG2-TTS payload

Abhinav Agrawal aagrawal at futopstech.com
Mon Sep 7 02:35:24 UTC 2020


Hi,

I need to depay MPEG2-TTS payload (timestamped TS) from an incoming RTP
stream. I was trying rtpmp2tdepay element but it seems it does not consider
the timestamp part of the packet and complains something like following -

>0:00:00.250589186 84 0x7fdb280044a0 WARN default
gstrtpmp2tdepay.c:175:gst_rtp_mp2t_depay_process: We don't have an integral
number of buffers (leftover: 24)

(Please note, the rtp packets having 6 TTS buffers, having 4 bytes of
timestamp additionally for each TS packet, so 24 additional bytes makes
sense to me).

Following is the pipeline, I used -

gst-launch-1.0 -e filesrc location=file1.pcap ! pcapparse name=pcap !
"application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)MP2T,payload=(int)103"
! rtpbin name=rtpbin ! rtpmp2tdepay ! tsparse ! tsdemux !
video/x-h264,framerate=15/1,width=1280,height=720 ! h264parse !
"video/x-h264" ! mp4mux ! filesink async=False location=out.mp4

I have a pcap file as source for now, unfortunately due to
confidentiality agreement with customers, can't share the pcap file
with the community.

Is there any in-built support in gstreamer to depay such a packet ? Or
any pointers for making rtpmp2tdepay work for this, maybe I should
apply a patch to remove those 4 additional bytes - will that be a
right direction ?

For those not familiar with MPEG2-TTS, I could not find much on the
internet , but just some japanese documents + wiki indicate that TTS
is nothing but 4 bytes timestamp + TS.
Some references (Sorry they are in Japanese - please translate with
google :)) :

https://ja.wikipedia.org/wiki/MPEG-2%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0

Any quick help would be highly appreciated.


Regards,
Abhinav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200907/ba8daef7/attachment.htm>


More information about the gstreamer-devel mailing list