问题
I am recording device screen using Mediacodec and Mediamuxer api everything is fine.
Now I want to stream this file while recording, but cant until muxer is stopped and moov atom is written at the end of file.
So my question is it even possible using Mediamuxer for the purpose? If not what are the alternatives?
回答1:
No, it's not possible.
In order to send an MP4 file while it is being written, you need to write fragmented MP4, and MediaMuxer only writes non-fragmented MP4.
来源:https://stackoverflow.com/questions/39483297/android-mediamuxer-moov-atom