Extract Wavelength from MP3 as an Image - audio

Are there any good libraries that can help convert an MP3 into an image of its wavelengths (I think that's the proper term). What I'm looking for is a way to generate the wavelengths of MP3s server-side like is done on Souncloud: http://soundcloud.com/smixx/takin-vc-money-money-cash-ipos
What would be the best approach to extact that type of image from an audio file?

This would be the best response from the community:
http://andrewfreiday.com/2010/04/29/generating-mp3-waveforms-with-php/
The correct term is WAVEFORM that's what you see #soundcloud.
From what I've seen, the PHP script is pretty lightweight and awesome!
BTW: I just realized that the stackoverflow question points to the same PHP code #andrewfreiday
EDIT: Just a FYI, I started playing with node.js for a while now and while I was making a simple MP3 player I started using this packaged for the waveform.
https://www.npmjs.com/package/waveform-data

Related

Get video stream from webcam in Linux

I'm looking for some general way to get video stream from webcam in Linux and then process and show it in a window. The second part seems simple, but I don't know how to deal with the first one.
Is there some API, lib, docs, etc?.. Where to start?
I've done a little of this before, and you're right, the second part is the easy part. You should take a look at this post for some of the commonly used libraries.
Video capture on Linux?
I would also throw OpenCV on that list, since it helps with both the obtaining and the processing of video streams:
http://sourceforge.net/projects/opencvlibrary/
http://www.willowgarage.com/pages/software/opencv
Good luck!

Cropping audio files?

I was wondering if there was a tool similar to jCrop, with the exception that instead of an image I'd allow the user to crop an audio file? Google didn't give me any useful results sadly :(
The reason why I'm asking is that I'm making a tool to convert audio files to popular ringtone formats, and only letting the user specify the offsets in numbers is somewhat inconvenient. Obviously the tool doesn't have to be in javascript - anything that fits into a website is ok.
Here's a browser-based audio editor written in Flash that you could probably adapt (it supports cropping):
http://www.hisschemoller.com/2010/audio-editor-1-0/
One thing I found a bit confusing is that you have to hold down the play button on the editor to play the full sound.

Searching for audio

I am looking for a toolkit or library to search contents of audio files for am audio sample.
For example I have 5 seconds of speech that I know it exists in hundreds of hours of audio, and I want to find exact file and position of this sub-samples.
The sample is %99 similar but maybe converted to different audio format so it may have minor differences in waveform.
I prefer .NET library if there is such an option.
Thank you.
What you are trying to do is not an easy DSP problem to solve, and there is no one foolproof method. There is however an excellent recent article on audio fingerprinting on codeproject which goes into some depth on an algorithm that searches for duplicate MP3s, with code in C#. You may be able to adapt the algorithm to your needs.

Available options for playing a stream or a remote mp3 file on iOS 4

I am trying to make an application for listening to podcasts. Each podcast is an mp3 file, around 50MB in size. After reviewing the Using Audio chapter of the Multimedia Programming Guide, I decided to use AVPlayer, as the other options did not seem appropriate. However, the more I work with AVFoundation, the more complicated it seems and I have a feeling that simply streaming an mp3 file should be easier. Plus on the top of this document, there is a note stating:
Important: This document contains
information that used to be in iOS
Application Programming Guide. The
information in this document has not
been updated specifically for iOS 4.0
Does that mean that I have some other options, or that AVFoundation is maybe an overkill for what I need to do? I would really appreciate it if someone could clear things out a bit and let me know if I'm making something wrong here.
Thanks in advance!
You should explore Cocos Denshion.
http://www.cocos2d-iphone.org/wiki/doku.php/cocosdenshion:cookbook
The audio engine comes with cocos2d, and it is just 5 classes you can include with your project.
It's very simple to use, as you can see from the above link. It's basically just a wrapper for some AVFoundation classes.
The only trick will be to stream your mp3, but it looks like you can simply update the Cocos Denshion CDAudioManager to hand a URL to the AVAudioPlayer, as a start. Whether or not that satisfies your streaming requirement, I don't know.
At the very least, it will give you some AVFoundation code to study.
I just found a pdf with a nice overview of some possible options from this course blog. Together with Julian's suggestion this is all I could find so far.

Finding audio peaks in video files

I have a bunch of video files that I want to process. I want to write a program that can find the audio peaks in each file and return the times where those peaks occurred.
I've looked for a lot of different APIs in different languages but couldn't get any of them to work. I am partial to php and java, so if anyone knows any good audio processing libraries in those languages that would be great! But really I don't care too much about the language. I will need to run this program on a cron.
Also, is it possible to use system calls to ffmpeg from within a script to accomplish this? Thanks in advance.
While I've only used this to work directly with audio files, the python wrapper around theechonest's audio analysis service can slurp in the audio from various video files. It uses ffmpegs shared libs to do this, though I find this wrapper much easier to work with via python then the command line.
Of particular interest within the api is echonest.video which is, to quote the docs:
Framework that turns video into silly putty.
I'd add a couple other helpful urls but apparently I can only add one since I don't have a reputation...
anyway, hopefully that's a helpful lead.

Resources