how to cut audio file and merge with video file in android? - android

I want to cut audio and merge an audio file with video programmatically in android.
I don't know how to work with FFMPEG , can anyone tell me how to start with or another solution?
Any Help?

Use mp4parser library
library
https://github.com/sannies/mp4parser
test
https://github.com/vicmns/mp4parser-android-test

Related

I am confused what ffmpeg file is in android

Please can anyone tell me the usages of ffmpeg file in android. Though I tried to browse but none of them satisfied me.
FFMPEG is library,it will used to decode and encode audio,video file , if you are streaming a video from your android application it will be used.

Combine / merge / mix multiple audio files with MP4Parser on Android

I have two MP4 audio files and one MP4 video file. I need to combine them to reproduce the video and the two sounds at same time (Parallel, Not concatenate), in order to get an only MP4 file.
For example, I have an MP4 audio file with voice, another with music, and another with video. I need that they play all together like a videoclip.
I have been trying to add several audio tracks to movie with MP4Parser with:
video.addTrack(audioTrack1);
video.addTrack(audioTrack2);
But when I play it, I only can hear one of them. Maybe MP4Parser is working correctly and I didn't understand this functionality, for this cause I need an answer about it.
Is it possible to do this with MP4Parser or I am wrong and it is impossible?
If it is possible, please could you give me a working example code?
Thank you in advance.

how to Create Video using Image And mp3 file?

I want to Create video using Image and mp3 or m4a file.
I try to use ffmpeg library but that library still not working for me.
I’m also try to use Media-codec and MediaMuxer.
if you have any new library or code then please suggest me.
Thanks in advance.

How to merge an Audio and Video files in Android

I have a small video clip and an audio file. The problem is how to write code to merge them into a single file. i have never written code for multimedia applications for android and don't know if the merging is possible with android media framework. Is there any third party library to do that?
Can we right a merging code in Java and call it in Android?
Please guide me through this. Thanks
You can try INDE Media for Mobile, tutorials are here: https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials
It has a sample demonstating how to substitute audio track in mp4 video file by another audio track from another mp4 file. It's here: https://github.com/INDExOS/media-for-mobile/blob/master/Android/samples/effects/src/com/intel/inde/mp/effects/SubstituteAudioEffect.java
In sample app it's under Audio Effect:

Android change audio of any video file

I am trying to apply new audio pitch for my video file.
I want to replace audio of my existing video by android code. Is it possible in android. can any one help me to do this
Is there any Android library support this facility to change audio for video file?
Any Help is appreciated...!!!
Thanks in Advance
This is not the exact solution but you can try it:
When you play the video file set its volume to zero.
At the same time use the service in which you can play any audio you want.
As service runs at background it has no effect on your video streaming.
When your video end,end your service.
And remember to set volume of your audio file.
You can change video pitch easily by following these steps :-
Add this library in your android project : https://gitlab.com/soundtouch/soundtouch.
follow this link for integrate this library process : https://stackoverflow.com/a/52425255/7899427.
After successfully integrate this library first of all extract audio file in WAV audio format. You can use ffmpeg library for do this.
Than using the soundtouch library you can change the audio file pitch and tempo rate and export new audio file in WAV format.
After complete these steps merge that converted audio file with video file.
Now will get the converted audio file with same video file.
Happy coding.

Categories

Resources