I am trying to build an Android application that is able to stream the screen over the network using an H.264 video feed in an MPEG2-TS container, sent over RTP (in case it matters, this is supposed to stream to a Miracast display). I have the screen recording and H.264 encoding working but can't figure out the MPEG2-TS container for the life of me. The RTP header is very simple and I resorted to manually crafting it with ByteBuffer
s and I am now trying to do something similar with MPEG2-TS but it is a very complicated format. I have found many libraries to parse incoming MPEG2-TS but nothing to generate it (the closest being codice/mpegts-streamer forked from taktik/mpegts-streamer but that requires an MPEG2-TS stream to be fed in, defeating the whole purpose). Are there any other libraries I can use for this or do I just have to reinvent the wheel myself?
Asked
Active
Viewed 593 times
0
1 Answers
0
I'm not sure if this will be useful for your situation, but you might be able to discern how to package mpeg-ts with some source I abandoned a long time ago here: https://github.com/Red5/red5-hls-plugin
It's mostly Java, hope it helps.

Paul Gregoire
- 9,715
- 11
- 67
- 131