Like the title mentioned, I want to combine an audio file with a video file programatically on android platform. So, if your guys have any idea about it, thanks for your reply!
First, build ffmpeg for android: http://trac.ffmpeg.org/wiki/How%20to%20compile%20FFmpeg%20for%20Android
Then you can invoke it with arguments by calling the main function in ffmpeg.c and it will be like running it normally, except it will actually run in your app's process.
Related
I'm going to make one app, in this the partial requirement is like this: get the currently playing audio name using service. I tried but I'm unable to find the exact way, here is my finding. How to get all the audio file using mediastore
There is no way to know what file another app may be playing.
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
I am new to phoneGap. I am creating a dummy app to upload an audio file from iOS/android device on local server. So I was wondering if there is a way to open the audio gallery and select the required audio file to upload. Similar to an image gallery.
Is it possible to open audio list and select necessary audio file? If not, what is the alternative?
As far as I remember, you cannot reach the pictures and audio files stored in the media gallery. Therefore, you may need to implement your own native plugin and call the appropriate methods from your JavaScript code.
You can capture audio/image by using Capture plugin of Phonegap. Check this out Capture Plugin
You can perform basic File operations as well. Check this out File Plugin
For your situation, you have to implement native interface which can be accessed by your JavaScript code. This would be an alternative way for it. If you desire to create your own plugin, please have a look at Plugin Development Guide. This might be helpful.
Well I have implemented code using file plugin which will iterate through all the folders recursively to find all the image (created this as I needed multi selection approach which is not directly provided by cordova) . You can modify the extension of image (search) i.e png,jpeg etc with audio extension.
With this code you will get the path of audio files and you can make use of filetransfer to upload it on server
Hope it helps you
I am playing a mp4 file using monkeyrunner's startactivity function,it is working.Now,i want to know whether the video is still playing or has ended.But,as monkeyrunner doesn't wait for the video(or any other activity)to finish or say "return".How to know whether the video finished or not?
You'll need to look at the android debug log in a sub-process. Hopefully the app that you are using to play the mp4 will have some type of log output when it finishes playing the file.
If you play the video file with the Gallery app, when you start playing the file, the logcat will show:
Displayed com.android.gallery3d/.app.MovieActivity
After the app finishes playing the file, the logcat will show:
Displayed com.android.gallery3d/.app.Gallery
You can look for these strings in the logcat.
As a side note, there are some system properties that you can check using monkeyrunner:
device.getProperty('am.current.package')
device.getProperty('am.current.action')
These show the package name of the currently running package and the current activity's action. Unfortunately when i used them, they returned a blank string, not the names I wanted.
I hope this is useful.
I'm attempting to run Kivy's audio example found here. The specific example is this:
sound = SoundLoader.load(filename='test.wav')
if not sound:
# unable to load this sound ?
pass
else:
# sound loaded, let's play!
sound.play()
When attempting to play any .wav file in my directory however, I just hear a click or pop noise. I've tried with different .wav files and am experiencing the same problem. I've also attempted to print out the length of the sound by using the length function, but it returns 0 for some reason. Any feedback or input from you guys? Thanks again.
Can't say just looking at the snippet above how you've implemented it in your Application or what's wrong.
There is a more elaborate example should be in the examples directory under your Kivy install directory that should clear up how to use SoundLoader.
Hope that helps.