depaying MPEG2-TTS payload

Mathieu Duponchelle mathieu at centricular.com
Mon Sep 7 14:57:46 UTC 2020


Hey, I'm not really familiar with it, but what you describe sounds like
<https://en.wikipedia.org/wiki/.m2ts>, I don't think we have a depayloader
for that format.

On 9/7/20 4:35 AM, Abhinav Agrawal wrote:
> 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
>
> _______________________________________________
> 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/20200907/0c2d8f5e/attachment.htm>


More information about the gstreamer-devel mailing list