[Live-devel] MPEGTS FramedSource

Ross Finlayson finlayson at live555.com
Thu Jun 4 07:29:53 PDT 2015


> I have an MPEGTS muxer (ffmpeg) that spits out 1316 (188 * 7) byte chunks of valid data at a time. In my FramedSource subclass, I can write this to a file via fwrite and have a perfectly playable mpegts file. I've been sending data to `fTo` in 1316 byte chunks (as hinted in our previous conversation). The library gives no error or warning and it looks like the data is getting sent out correctly looking at IO rates in wireshark. My total rate is only about ~2Mbit/s, but `openRTSP` only writes it's output file at ~160Kbit/s.
> 
> I am curious of the proper "rate" to feed `fTo` for my MPEGTS FramedSource. I figured <= MTU sized data would be best, but it seems maybe something else. Ideas?

Can you describe some more how your system is structured?  (I assume, based on your previous message, that you’re still developing a RTSP server.)

In particular, does your “createNewStreamSource()” implementation (in your “OnDemandServerMediaSubsession” subclass) create only an instance of your “FramedSource” subclass, or does it also feed this to a “MPEG2TransportStreamFramer”?  (If your “FramedSource” subclass is getting data from a live input source (e.g., from an encoder), rather than from a pre-recorded file, then you shouldn’t need to feed it to a “MPEG2TransportStreamFramer”; however, in that case it’s important that your “FramedSource” subclass set “fPresentationTime” and “fDurationInMicroseconds” correctly, so that the downstream object (a “SimpleRTPSink” in this case) will request data at the correct rate.)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150604/5efbb008/attachment.html>


More information about the live-devel mailing list