Android change audio of any video file - android

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.

Related

how to cut audio file and merge with video file in 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

Android_Can't play the mp4 file generated by MediaMuxer

I am trying to use MediaCodec and MediaMux to generate mp4 file. The code I am using is here.
I get some mp4 file. However, I can't play it with my player, which is just a normal software.
Does anyone has any idea? What should I do next?
I had a similar issue - in my case I simply wasn't calling muxer.stop() and ended up with a large unplayable file.

streaming a mp4 file using RTSP?

I am developing an app. that will stream the video recorded from camera and stored as mp4 in sdcard...
I know there something called as RTSP which is used for that...
Please tell me where to start . .and is there any library that will do this for me...
I do not understand why you want to stream a local mp4 file, but maybe I misunderstood you problem. RTSP is used for live streaming, but you want to play a local mp4 file.
If you want to capture video and save it as mp4 onto a SD card, you need to use the Android MediaRecorder. Here a link to a simple example.
If you just want to playback a local mp4 file. Have a look at the Android API Demos.
These are part of the Android SDK installation and contain a good example of how to playback local media files.

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:

How to play .aac format audio file in android

How to play .aac audio format in android.
I tried using ffmpeg convert audio format and play in android-ndk. But im not able to implement.
Please let me know any ideas or any ref link to follow
You can check this native aac player implementation. It is ffmpeg-based, and I heard it is fairly light on CPU.
http://code.google.com/p/aacplayer-android/

Categories

Resources