MediaMuxer is stuck during initialisation?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

MediaMuxer is stuck during initialisation?


we have an application that records the device's screen and microphone and writes both stream into an mp4 using a MediaMuxer. We are recording these videos in segments of 30 seconds length, i.e. after 30 seconds, we stop the current MediaMuxer and start a new one to record the next file. We now observed situations were this restart gets stuck and never starts writing the new file. The call that apparently never returns is, weirdly enough, the MediaMuxer constructor. We call it like this:

mMuxer = new MediaMuxer(getPath(), MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4);

According to our logs, our code does not get past this point. Unfortunately, I have no idea what's going wrong here.

I'm looking for theories on what could be going wrong in the constructor of MediaMuxer that's causing it to not return/hang?
Does it need to acquire some system resources that it might wait for indefinitely? Memory or File handles maybe?

Any pointers would be appreciated!

Thank you,

You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at
For more options, visit