Hitesh Patel
Hitesh Patel

Reputation: 2878

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

Upvotes: 6

Views: 4489

Answers (2)

parikshit tiwari
parikshit tiwari

Reputation: 31

You can change video pitch easily by following these steps :-

  1. 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.

  2. After successfully integrate this library first of all extract audio file in WAV audio format. You can use ffmpeg library for do this.

  3. Than using the soundtouch library you can change the audio file pitch and tempo rate and export new audio file in WAV format.

  4. 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.

Upvotes: 0

dd619
dd619

Reputation: 6200

This is not the exact solution but you can try it:

  1. When you play the video file set its volume to zero.

  2. At the same time use the service in which you can play any audio you want.

  3. As service runs at background it has no effect on your video streaming.

  4. When your video end,end your service.

And remember to set volume of your audio file.

Upvotes: 2

Related Questions