RTP from MPTS File

ht techdev ht.techdev at gmail.com
Tue Aug 30 20:30:33 UTC 2016


Thank you. Ended up using tsparse. And you are right, there is a missing rtpmp2tpay before udpsink, my bad.
Cheers,
-----Original Message-----
From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Sebastian Dröge
Sent: Monday, August 29, 2016 11:36 PM
To: Discussion of the development of and with GStreamer
Subject: Re: RTP from MPTS File

On Mon, 2016-08-29 at 12:30 -0700, ht techdev wrote:
> Hi
> On gstreamer 1.4.5, running on Centos 7, I would like to send  mpts 
> files, i.e., multi pid mpeg2 transport streams, as rtp using udpsink.
> I know that filesrc does not provide a clock source, unlike videotest 
> src, when is-live=true, so tried to generate one using multiqueue.
> Here is my pipeline:
> Chunk=$(echo "$BlkSize *10^9*$Duration/$FileSize" | bc) filesrc 
> location=$IN_FILE_NAME blocksize=$BlkSize do-timestamp=true !
>                 multiqueue max-size-time=$Chunk max-size- 
> bytes=$BlkSize use-buffering=true low-percent=0 high-percent=100 
> sync-by-running-time=true ! \
>                 tsparse ! \
> udpsink port=$LOCAL_PORT host=$IP
> The assumption is that over small time periods all pids behave are 
> CBR, and duration of total file read + queue should be the length of 
> the longest video pid, as specified by $Duration. What I am seeing is 
> that $BlkSize is the only parameter that is effecting the transmission 
> time, independently of $Duration. Essentially, transmission time is 
> inversely proportional to $BlkSize.
> Any ideas or suggestions as how to proceed?

Use tsparse with set-timestamps=true (requires GStreamer 1.6.0 or newer), and don't do do-timestamp=true on filesrc. filesrc has no way of knowing the correct timestamps.


Also what you're doing there is not RTP but plain MPEG-TS over UDP. If you want to do RTP, you at least need rtpmp2tpay before the udpsink, ideally also rtpbin (more complicated) if you also want to support RTCP.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com



More information about the gstreamer-devel mailing list