Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Audio recording corrupts MP4 on android

Mohamed_R_
Beginner
91 Views

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
Harshdeep_B_Intel
91 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