ICU_
ICU_

Reputation: 159

Wrapping an h264 stream with ts (transport stream)

Suppose I have an incoming stream of H264 data wrapped in RTP. After I strip the RTP header, how can I re-wrap it into a TS header (transport stream) for playing on the web browser? I know Ffmpeg can do it, but am not on a windows or linux platform. So I need to manually do it. I would need a simple library in c or c++.

Upvotes: 1

Views: 1675

Answers (1)

Markus Schumann
Markus Schumann

Reputation: 8254

I'd give http://www.live555.com/liveMedia/ a try. There are a number of sample applications that are similar to your needs. Check out testH264VideoToTransportStream.

Note: There may be more to it than swapping headers. Sometimes SPS/PPS (metadata) are not repeated in the H.264 stream. So you have harvest SPS/PPS through RTSP and then inject SPS/SPS into the MPEG-2 transport stream.

Live555 builds on a large variety of platform but if you are bare metal you may have to do some code adjustments.

Upvotes: 2

Related Questions