[Live-devel] Demux live MPEGTS multicast stream and feed it to RTSP server

Thorson, Joshua C joshua.thorson at gatech.edu
Mon Mar 22 12:00:14 PDT 2021


> I've done some more testing and have seen some promising results:
>
> I used the suggested pipline:
>     MPEGTS Multicast Stream -----> BasicUDPSource ----> FileSink
> but I have it write to stdout instead of a file. I then pipe this into testMPEG2TransportSplitter like:
>
>    basicUDPtostdout | testMPEG2TransportSplitter
>
> This works just as I would expect it to, dumping out the live h264 video stream into its own file. So now the question is why doesn't using the BasicUDPSource as a FramedSource work with the MPEG2TransportStreamDemux. The only thing I can think of is that it has to do with the buffer of the UDP source getting filled up.

I figured out the issue with using the UDP as a source for the MPEG2TransportStreamDemux:

It seems to be an issue with the StreamParser, when it is ensuring valid bytes the number of bytes that are needed is only 1 but the UDP source is reading ~940 bytes. So, the if statement: fCurParserIndex + numBytesNeeded > BANK_SIZE never becomes true, thus never switching the parser banks. I fixed this issue by subclassing the BasicUDPSource and overriding the maxFrameSize function to something > ~940.


With this now working I now need to figure out how to hookup the MPEG2TransportStreamDemux to the H264VideoRTPSink. I believe it should go something like this:

  MPEGTS Multicast Stream -----> BasicUDPSource -----> MPEG2TransportStreamDemux -----> H264VideoRTPSink

However, I understand I don't have the ability to specify the sink for the various demuxed elementry streams. Is there any way this could be added or subclassed to allow such a thing?

Thank you,

Josh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20210322/c49c59b8/attachment.htm>


More information about the live-devel mailing list