RTP from MPTS File

Sebastian Dröge sebastian at centricular.com
Tue Aug 30 06:35:46 UTC 2016


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160830/3d4be728/attachment-0001.sig>


More information about the gstreamer-devel mailing list