[Live-devel] How to play a MPEG2-TS (H264 transport stream) live stream

leonardo.citraro at dos-web.net leonardo.citraro at dos-web.net
Fri Apr 8 07:33:01 PDT 2016


Dear All,

I have a problem about playing an MPEG2-TS stream coming from a 
modified version of the test example testRTSPClient.
I managed to add the object MPEG2TransportStreamFromESSource to convert 
the H264 stream (coming form an IP camera) to MPEG2-TS in the function 
continueAfterSETUP() and starting the stream by calling the 
sink->startPlaying() on that object.
In the function DummySink::afterGettingFrame() I am able to read the 
stream composed of packet of 188 bytes ( TS header + PES header + 
payload), however, VLC cannot play it.
I am pretty confident in saying that the problem come from the fact 
that at the beginning of the frames there is no sync header 
\00\00\00\01.

Is there a proper way to parse those packets and put the \00\00\00\01 
in the proper position? or create an additional object in 
continueAfterSETUP() in order to integrate the sync header before the 
conversion ES->TS?
or even a decoder TS->ES?

Thank you very much for your help.
Best regards


More information about the live-devel mailing list