Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
aiken
Aged Yak Warrior
525 Posts |
Posted - 2002-06-05 : 13:34:18
|
| Ok, here's a good one. I'm going to have some MP3's and WAV's in my database (I know, it would be nice to store them on the filesystem, but they'll be fairly small and I don't want to much around with shipping the files to all of the web servers).Has anyone come up with SQL functions / SP's to get the metadata from audio files? There's some source code floating around for doing so in VB, and I can probably port it, but I'm hoping not to reinvent the wheel if anyone has already done the work.Cheers-b |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-06-05 : 15:52:21
|
| I don't have any but the question has me interested . . . I'm working on it right now . . .Are these ID3v2?<O>Edited by - Page47 on 06/05/2002 15:56:34 |
 |
|
|
JustinBigelow
SQL Gigolo
1157 Posts |
Posted - 2002-06-05 : 15:55:31
|
| I think you are going to have to use a DLL file for pulling the metadata. You can then instantiate the DLL from within SQL Server via sp_OACreate (see BOL for more info) to run other OLE object stored procedures to get the data. SQL Server is designed to handle native data sets not a wide variety of file types.hth,Justin |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-06-05 : 15:57:54
|
| I dunno, you've got the data in there . . . I bet there is a way to readtext the correct bits and convert them to charto get the info . . .EDIT: Actually,having looked into it a bit, the id3v1 format I think could be done, but the id3v2 is much more complicated . . . It'll be a shame if you have to right the file out to disk though . . . <O>Edited by - Page47 on 06/05/2002 16:05:09 |
 |
|
|
aiken
Aged Yak Warrior
525 Posts |
Posted - 2002-06-05 : 16:45:17
|
| I'm actually not even looking for the ID3 data; I just need to get bitrate and such, so I can get length from the datalength divided by bitrate. It's definitely posssible; here's one link to a VB routine to do it: http://groups.google.com/groups?q=mp3+dtob+btod&hl=en&lr=&ie=UTF8&oe=UTF8&selm=7p9gr5%24fe6%241%40nusku.cts.com&rnum=1...I'm just hoping not to have to convert that into a SQL function. Sounds like I may have to, though.I'd rather not use sp_OACreate and an external component -- we're currently troubleshooting a SQL problem that seems to be related to our use of CDONTS from within SQL server (every 18 days, the SQL server dies with something like "unable to spawn process_loginread"). Newsgroup reports suggest that this is related to the use of activeX components in SQL server (presumably a memory leak). So I'd like to leave that stuff alone until we figure out what's going on there (I know that many people are using CDONTS successfully; our combination of NT 4 + SQL2K + 25,000 emails/day may be the issue).Plus, to use a component, I'd have to write out the mp3 data to the server's disk, call the component, delete the data. That's pretty inefficent considering the data is already in the DB.Cheers-b |
 |
|
|
jbkayne
Posting Yak Master
100 Posts |
Posted - 2002-06-13 : 19:50:14
|
| I have a similar request: Does anyone have code to extract metadata from a WORD document?In particular "Author".Thanks in advance! |
 |
|
|
|
|
|
|
|