<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Sat, Apr 4, 2015 at 2:21 PM, João Pais <span dir="ltr"><<a href="mailto:jmmmpais@gmail.com" target="_blank">jmmmpais@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I couldn't find an answer for this, so I doubt there is one: I have 100s<br>
of mp3 files, from which I needed to extract data - namely name, and<br>
duration.<br>
</blockquote>
Would that be file name, or artist name?<br>
</blockquote>
<br></span>
yes, file name. although as a general idea it's interesting to get any field of the metadata.<span class=""><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As I can tell, there isn't any object that does this, e.g. like<br>
[ext13/wavinfo] (hopefully I'm wrong).<br>
Does anyone has an elegant solution for this?<br>
</blockquote>
On Linux I'd simply run the sox or soxi command from the command line:<br>
soxi *.mp3<br>
and save its output to a textfile.<br>
Afaik sox is available for Windows as well, perhaps take a look at<br>
<a href="http://sox.sourceforge.net/SoX" target="_blank">http://sox.sourceforge.net/SoX</a><br>
</blockquote>
<br></span>
yes, I imagine there is no other choice with current pd objects. which is a pity, as mp3 support is far from ideal.<div class="HOEnZb"><div class="h5"><br>
<br></div></div></blockquote><div><br></div><div>It seems there is no standard for the metadata in mp3 and several different methods are in use. Some of them are at the end of the file and others at the beginning, so it's not straightforward.<br></div><div>Most of the tags give the name but not all of them give the length, and since mp3 is compressed in a non-linear way, there's no way to determine the length except by playing it.<br><br></div><div>Martin <br></div></div></div></div>