Android libraray for generatring Waveforms from audio file [closed] - android

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm currently developing an android app and need to be able to render a Waveform of an audio file. I already read about the Visualizer class, but I think that class is designed to do realtime calculation. What I want to do is go trough an audio file and generate for example an .PNG that contains a waveform of the whole audio file.
Basically something like soundcloud does:
http://www.djban.com.br/wp-content/uploads/soundcloud-waveform.png
Are there any libraries that can do this? Or can you tell me how I can get an array of amplitudes of an audio file?

I don't know of any library but it should be easy to get it working.
First, in order to get the Amplitude of the wave form, you will need the audio in PCM format.
Assuming that you need the waveform for arbitrary audio files (mp3 in particular), you will need to find a way to convert between formats. A quick google search gives this result.
NOTE: if you just need to do it for audio coming from the microphone, you can avoid the conversion since it delivers audio data in the PCM format.
After getting the samples, you will need to draw their amplitudes somehow. You have several options, but I would give the Canvas a try. You can draw lines (or general shapes) there and then export it to a file or draw it on the screen.
Another option to draw is OpenGL. This is more complicated if you haven't use it before, but it will be probably faster.

Related

Downloading a video from Firebase Storage - chunk by chunk [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm building an app with java (for android) that one of it main goals is to show a video to the client.
Right now I'm storing all my videos in firebase storage, At the beginning I wanted to stream the video (youtube style) but unfortunately firebase storage does not support it.
I read that there is an alternative way of "faking" to stream the video by downloading the video chunk by chunk and playing it one by one, that way you don’t need to wait until the whole video is downloaded locally to the phone and only after that start playing it.
You can see what I'm talking about here -
Speeding up firebase storage download
So my question is which API/library/thing can I use to do it, and if somebody has an example code that he can show me ?
Thank you very much !
The Firebase SDK for Cloud Storage does not have any methods to stream the results.
The options I can quickly think of:
Store the video in smaller chunks, each chunk in a separate file. That way you can retrieve the files one by one, and start playing when you have the minimum number of chunks.
Set up your own server which reads from Cloud Storage (typically at a much higher bandwidth), and then sends a response to the client in smaller chunks. For more on this, also see this answer: Video Streaming from Google Cloud Storage
Neither of these is going to be trivial to implement, so you might want to consider if maybe a dedicated video streaming service isn't a better fit for your needs.
You may use Mux or Cloud Flare to stream videos
https://blog.codemagic.io/build-video-streaming-with-flutter-and-mux/
https://developers.cloudflare.com/stream/

Video Editor in Flutter using dart [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am looking for a plugin or example of a video editor in flutter using dart.
I have tried the following plugin https://pub.dartlang.org/packages/video_player, but it doesn't seems to have properties that I can edit the video. Example trim or add a watermark on the video.
Many Thanks
You can use this Flutter package called video_trimmer. This package is developed by me, it helps in trimming videos in most of the commonly used formats. You can also generate GIFs from the videos.
This also provides a nice UI for trimming videos.
The package is currently in beta stage. So, feel free to make a PR on the GitHub repo of this package, if you have any suggestions for improvement.
Currently, it doesn't have the feature to add a watermark to any video.
Comments mentioned https://github.com/tanersener/flutter-ffmpeg, though I couldn’t find anything that explicitly documents a way to edit the video, such as a watermark. But it should be possible according to others https://stackoverflow.com/a/57847155/6668797.
There’s also https://pub.dev/packages/video_manipulation
Adding still frames to an existing video, e.g. watermarks
.generateVideo(List<String> paths, String filename, int fps, double
speed).
Parameters paths list of input file paths. Can be images (.jpg or
.png) or video files (.mp4) that are used to generate the new video.
E.g.: ["documents/input.mp4", "documents/watermark.jpg]
Otherwise, there’s currently not much in readily available packages for video editing for Flutter as I couldn't find anymore at https://pub.dev/flutter. For more options, you’ll have to seek out native Android/iOS libraries and custom integrate them through the platform channels.

How to implement Video filter on android like instagram [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I need to add video filter in my android app like Instagram. I searched alot but did not find much stuff. Is there any library for this like aviary sdk for image editing ?
The shortest way to do this would be using OpenCV library for Java (importing it to Android project could be trcky) - it enables you to easaly extract each frame to different types of Image objects on which you can apply your filter (not sure if OpenCV contains tools for doing this) and then composing a new Video with modified frames.
Have in mind that this might be highly both CPU and battery consuming and I am not quite sure how would this work on various hardware configurations.
The other - longer - solution is to dig in to Android NDK and try to use ffmpeg. All in all it might decrease CPU load.
Also the new Android L release will provide some basic filters for Camera (not sure if this includes videos) https://www.youtube.com/watch?v=Xtp3tH27OFs so you could wait for some Compat library
I have give some filter for video like instagram filter using OpenGL ES. That is very fast and very nice.
If you just want to filter and show the video, u can see about this example, u can visit https://www.virag.si/2014/03/playing-video-with-opengl-on-android/. For another filter u can edit the fragment_shader.
But, if you need to render the video filtered and save that to sd card, you need mediacodec and mediamuxer. You can show the example from here http://bigflake.com/mediacodec/.
Hope this can help u, and sorry about my english.

Compare two audio files in android [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm making an android app in Eclipse and i want to record my voice, which will be password for login into application. When i try to log in it should recognize my password and let me use the application. How can i do that comparison in order to get a match, i need something like shazam? Thanks for any tips!
Audio comparisons is a very complex topic. Generally, if you don't know anything about it, I'd discourage you to head into such a project.
The problem is, that while you could of course just compare the two audio files byte by byte, that certainly is not what you want. Although two audio files sound the same, i.e. it contains the same spoken words, the actual data will differ quite a bit.
You'd have the following possibilities:
Try to recognize what the user said (Speech recognition), and check whether the same word was recognized later. This solution, while being the simplest, could not distinguish between different users.
Dive into the mysterious world of audio processing. A technology called Fast Fourier Transformation is more specifically what you'll be ending up dealing with.

Get Raw Magstripe Data with audio jack reader [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
So i have recently acquired a few paypal magstripe card readers for free. My goal is to use this to get the raw data via the audio jack on an android device. My best guess at how to do this would be to use the AudioRecord stuff in android, then decode the audio signal. Would this be the best way? Anyone else tackle stuff like this? Examples?
This is not as simple as you might first imagine.
Record Audio. You will have to continuously read audio and place it into a buffer.
Decode Audio, save as 16bit PCM encoded, sampled at 44100hz. You will have to note when zero crossings occur and based on it generate a binary string. Then convert that binary string to ASCII.
Once you are this far you have your track 1 or track 2 data! From here you can follow the ISO 7813 format if you are parsing credit cards. It fairly easy to parse, once you understand the spec.
Check out these resources. Good luck!
AUDIO TO TRACK DATA:
http://www.instructables.com/id/Read-any-magnetic-strip-card-with-a-Square-reader-/
TRACK DATA:
http://en.wikipedia.org/wiki/ISO/IEC_7813
http://www.gae.ucm.es/~padilla/extrawork/tracks.html

Categories

Resources