How can i create audio visualizer in android studio? - java

I am creating sound recording app, and i need to create audio visualizer. I looked at this similar question, but there was only outdated libraries and i looked at several other questions, but i could not find the answer.
Do you know about any open source github not outdated projects?
I want to make a sound visualization that would look something like below image:

You can use this Library for a visualization of your Audio while recording
https://github.com/SimpleMobileTools/Simple-Voice-Recorder
I have used this in my application, and it's working really well.
It's not outdated, and is up to dated to be used in new projects.
Thanks

Related

How to build and use ffmpeg within android

I am prototyping a fairly simple camera app to test out using MediaRecorder to create a custom camera activity with one snag, I want to set the aspect ratio of recorded videos to a 1x1. Through much research I have found that this is only possible by using a library like FFMPEG to crop each frame of the video to the size I desire.
I have read many tutorials and articles on different ways to build FFMPEG into Android, but most of them are either outdated and use older versions of both the Android NDK and FFMPEG, or more recent ones just do not work when followed. I tried following the popular http://www.roman10.net/how-to-build-ffmpeg-for-android/‎ and a few other similar ones that all lead to an error about a missing pkg-config file because FFMPEG is generally meant to be installed on linux or another OS apparently. I found some information about building FFMPEG in android by using a make-standalone-toolchain.sh file here http://software.intel.com/en-us/android/blogs/2013/12/06/building-ffmpeg-for-android-on-x86 and can't make heads or tails as to how to go about using this method.
This now leads into my question: What is the best/proven way currently to build and use FFMPEG within android applications? If the standalone toolchain method is the way to go, is there any material better than the one listed that is easier to follow? I would even be open to a reliable template application with the FFMPEG Libraries ready to go (if this is possible); although, I would much rather know how to build this into android for future use.
Thank you in advance for any advice or suggestions on this issue.
I have successfully build ffmpeg libraries using
https://code.google.com/p/dolphin-player/
You have to be on Ubuntu to build that.
This is the guide I liked the most: http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/
If you need more options, you can take a look at these, which are equally good:
https://github.com/guardianproject/android-ffmpeg
https://github.com/halfninja/android-ffmpeg-x264
https://vec.io/posts/how-to-build-ffmpeg-with-android-ndk
EDIT: I updated the first link with a more recent article (it uses NDK r9).

Running ffplay video within a jframe

I wish to play a video in JFrame. I am already using ffmpeg in my project. As I wish to keep the project light, I am not willing to use other frameworks like JMF or other. I know that I can play video using ffplay. But the problem here is ffplay opens the video in new window when I try
ffplay output.avi
I wish to put that video within my JFrame, like a player. How can I do this?
Request:
Please ask for any other clarifications, details, and suggest improvements or comment what you find wrong before downvoting or voting to close the question:). I will change it. I am really new to Java, I tried searching this but could not find any possible solution.
What I tried? I couln't find anything related to this, so I don't have any code. I am familiar to how to create frames, and can use runtime to ffplay video. But I got no clue how to put that video within my window:(.
All suggestions are welcome if you can suggest me other methods to play the video. But I haven't use any frameworks other than ffmpeg. And do not wish to make the application heavier. So it would be more helpful if it can be achieved using ffplay.
Look at the JMF 2.1.1 - Supported Formats. If the video types you wish to support are covered by the cross-platform1 version of the JMF, or you can find an SPI for the format, I'd say use JMF.
The 'performance pack' version uses natives which are now very old. I would not recommend trying to use them.

Library that can extract and play video file

I will build a simple program that
Can play video file (.mp4) in my program.
Can extract the video, so that I can get the title, length, subtitle, and the audio, etc.
What is the library in Java that I should use?
I have googled, but I still can not find the best library. By the way, I have tried to download xuggler, but I can not find any file.exe that can install this library.
Please be kind because I never make a code regarding video player and video extractor.
For playing audio and video in your java program use Java Media Framework. It contains jar files that will provide you classes to play and handle audio and video files.
Use this tutorial for understanding of JMF.
I have successed to use xuggler in java. Xuggler website is suck because they don't keep good installer in their website. Every beginner who use xuggler must be have some trouble like me.
For every one who want to use Xuggler, you can follow this website
http://www.benfarahmand.com/2012/11/tutorial-using-xuggler-in-processing.html
the link to download file.exe xuggler is here: https://www.dropbox.com/s/oh7zcyilibzfoyb/xuggle-xuggler.5.1.0-win64-setup.exe
Thank you :)

How to play tracker modules on Android?

I posted this question over at anddev.org and thougt here was a good place to post this too because this site has a bigger usergroup.
I will make it shorter here: How can i play .xm or .mod files on the android platform? Is there a good android compatible library for the playback? I cant seem to find one. I dont search a player like Extended Multimedia Player, just a library.
I know i could convert all the modules to mp3 but I don't like that. It would blow up the app in filesize.
Regards.
AndEngine is probably a good way to go.
Or if you just want to add mod/xm playing to your own code base, check out my page:
building libmodplug for android
there are a few caveats (using older Android NDK, building version 0.8.6 of libmodplug, could use better thread handling) but basically it works. There's an example apk with source.
Also recently added a new app using libmodplug with soundtracks from two of my games - 44 songs in 1.2MB :)
PGsoundtracks
The 2D game engine AndEngine has an extension that can play .mod files, it might suit your needs:
http://code.google.com/p/andenginemodplayerextension/
download xmp player from Android Market. That is the module Andengine extensions are using. You don't need Andengine nor their extensions for that.

Converting audio files(.3gp) to video with Album cover and uploading to YouTube

I have an audio file in .3gp format on my Android device which I wish
to upload to YouTube. I know that YouTube is a video upload site and
that I need to convert this sound file to video.
I just want an image to display all the time the audio is playing.
Google tells me there are number of tools that can help me. But I want
to do this via java code from my Android device.
Please help.
Thanks.
There are tools such as FFMPEG available for free that allow you to, essentially, mix and convert heterogenous streams. That is you can add a bitmap to a video, create video from slide shows and then add sound etc. (See a related question I asked here).
These programs can be executed from within java applications by making Runtime.exec(..) calls.
Sun has an example for stitching multiple JPEGs together into a movie, you can find it here. You should be able to take this example, (its fairly robust), and add what you need to it.
I recommend looking into the Java Media Framework (FAQ)
You can find a vast collection of sample applets/code at the Sun Solutions page. You can find the API on this page. I do hope this is compatible on the Android platform, as I haven't had any personal experience developing for it. But it might be a good place to start.

Categories