Search code examples
javaencodingflvmp4mpeg

Which is the best media container?


I'm creating a live streaming app, but I have an issue on which media container is best to choose.

So far I tried ScreenCodec1 and ScreenCodec2, but those are really heavy for a live stream, and the latency is horrible.

Can you suggest a media container that is lightweight? Which is better:

  • mp4
  • flv
  • mpg

Any suggestions on how to encode this with Java from a set of BufferedImages will be appreciated.


Solution

  • Xuggler can help you with the encoding side of things, see this page. As for what format you want to use, that's up to you - it depends on the context and situation. FLV is probably the most widely supported, if that's an important consideration.