I will develop an android application to combine video and audio recordings (audio as the background sound of the recording), I have read some ffmpeg and mp4parser references, can anyone help me?
Asked
Active
Viewed 161 times
1
-
i think you want to merge and audio and video together. right? – Jins Lukose Sep 24 '18 at 09:01
1 Answers
0
Unfortunately, there is no simple way to make an application like you need. The source code will be huge, so I can give you a description of an algorithm and some useful links.
Video: You need to record a video using the camera 2 api and Surface. This Surface should be gotten from MediaCodec (encoder). The MediaCodec (encoder) will encode video frames from a camera and convert them into ByteBuffers.
Audio: You need to extract an audio from your raw file using MediaExtractor which will extract audio samples as ByteBuffers.
Muxing: Both, audio samples (ByteBuffers) and video frames (ByteBuffers) should be muxed using MediaMuxer.

Oleg Sokolov
- 1,134
- 1
- 12
- 19
-
thank you so much, is there an SDK that has provided it all, so, I just call the function – keen Aug 10 '18 at 13:35
-
-