depaying MPEG2-TTS payload

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

depaying MPEG2-TTS payload

Abhinav Agrawal
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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: depaying MPEG2-TTS payload

Mathieu Duponchelle
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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: depaying MPEG2-TTS payload

Abhinav Agrawal
In reply to this post by Abhinav Agrawal
Thanks for your response. 

> I don't think we have a depayloader for that format.  
I also thought so. 

>"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 ? "

Would you or anyone in the community like to comment on that ? 

 
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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel