Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Mohamed_R_
Beginner
42 Views

Audio recording corrupts MP4 on android

Hello,

I've been trying to capture ingame footage through unity and i managed to get the tutorial files working except for the audio.
I kept getting corrupted mp4 files (on LG G2), here's a sample https://mega.nz/#!2VBzDA6S!4oXcpZIvi9d3NnfnogeXNWr9N7v-xtK27nSYuo-vvVs

After commenting capturer.setTargetAudioFormat() the output video was playable but of course without audio.

capturer = new GLCapture(new AndroidMediaObjectFactory(context), progressListener);
capturer.setTargetFile(videoPath);
capturer.setTargetVideoFormat(videoFormat);

AudioFormat audioFormat=new AudioFormatAndroid("audio/mp4a-latm",44100,2);
//Commenting the following line makes the video work
capturer.setTargetAudioFormat(audioFormat);

 

I'd appreciate shedding some light on what this behavior might be from.

0 Kudos
1 Reply
42 Views

Hi Mohamed,

Thank you for  bringing this issue to our attention. This audio issue is due to Media for Mobile library. This is library bug and one of known issue. I have sent a private message in regard to support for Media for Mobile product. 

Thanks, 

Reply