LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT of MP3 file without Playing it

Does anyone know if you can perform an FFT operation on an MP3 file?  I don't want to (and can't) play the file, I just want to read it and perform the FFT.

 

Thanks!

 

-Matt

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 1 of 6
(5,207 Views)

To perform an FFT you will need the rawaudio content (usually interleaved WAVE format), and to get that you will need to decode the MP3 content. Although you won't be 'playing' the MP3, you'll need to effectively perform 90% of the same processes as an app that would. Decoding MP3's isn't easy, but should technically be doable using a third-party library such as FFMPEG, although this could be a lot of work.

 

I believe I read something once about an MP3 compatible plugin somewhere on the NI website, maybe that's a starting point?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 2 of 6
(5,183 Views)

Funny you should mention FFMPEG -- that's what I'm using to create the MP3 file in the first place.  Are you saying that there's another format that would be easier?  If that's the case -- GREAT.

 

I looked up the MP3 compatible plugin -- looks like it's more about playing MP3's than analyzing them.

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 3 of 6
(5,169 Views)

If you are using raw wave files to rip your MP3s you should analyze them instead of going through the trouble of decoding the MP3s.  Look at the example called Read Sound File to Chart.vi to see how to extract the left and right channels of wave data, then do your FFT on the arrays.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 4 of 6
(5,163 Views)

Unfortunately, I have a video file.  I'm using FFMPEG to break out the video (actually into individual JPG's) and audio (as an MP3 file).

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 5 of 6
(5,158 Views)

I've never really used it but I'm pretty sure FFMPEG supports .wav format for audio output.  Here is a link to their doc page:  http://ffmpeg.org/ffmpeg-doc.html#SEC1

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 6 of 6
(5,155 Views)