Search code examples
androidvideo-processingvideo-encoding

How to Create a video in Android?


I am new to android. I have two files of same length, One is audio file and one is video file with no audio. I want to make a video with audio by combining these two files. Help me to achieve this task.


Solution

  • I assume you have native Android app and familiarity with Java (or know porting the code in native C) and are willing to use other open-source classes in your project.

    This is what you might give a head-start: Since this project is not actively maintained now, you might have to fork and use their logic into your code.

    https://github.com/tqnst/MP4ParserMergeAudioVideo

    Another alternative is using ffmpeg port for Android (however I am not sure how this works natively).

    https://github.com/WritingMinds/ffmpeg-android-java