0

I'm trying to get video/audio metadata (in particular, the title) from HTML5 <video>'s and <audio>'s. I've not been able to find anything at all about it - am I correct that this is not possible through DOM manipulation/javascript?

If that's the case, I'm thinking I will have my server download the media file and look through the metadata to determine the title (if there is one). In that case, I'm using Node.js. Is there a good library in Node that I could use? I've tried the "fluent-ffmpeg" but it did not seem to be able to get data for most of the videos I'm using - perhaps they were using codecs that it did not understand.

Any ideas? Thanks :)

Musa
  • 96,336
  • 17
  • 118
  • 137
cjroth
  • 607
  • 1
  • 6
  • 19
  • can you provide example content because there is no title attribute in video according to w3 (http://www.w3schools.com/html5/tag_video.asp ) – Jakub Oboza May 06 '12 at 22:05
  • Metadata comes in many forms, shapes, and sizes. What **specifically** are you after? – Brad May 07 '12 at 03:06
  • @JakubOboza The title attribute is a global HTML5 attribute: http://www.w3schools.com/html5/html5_ref_globalattributes.asp – cjroth May 07 '12 at 19:39
  • @Brad Specifically I'm after the title. That's really the only thing that matters, actually. – cjroth May 07 '12 at 19:39
  • @chrisrxth, Right, but depending on how you are accessing that media, getting that title varies greatly, and most often, it never exists. So again, are you looking for some sort of generic solution that will work with most types of media? If so, I don't believe it exists. – Brad May 07 '12 at 20:20
  • @Brad Thanks for your response! I'm looking for pretty much any solution that exists - something that works in all cases would be nice, but it doesn't seem like that's possible so something that works only part of the time is still better than nothing at all.I'm – cjroth May 07 '12 at 22:24

2 Answers2

0

For this, you will typically have to get any metadata server-side. I don't know what language you're using, but TabLib can work well with many.

Metadata for streaming media is a whole separate issue, and is entirely dependent on the server hosting the media. For Icecast/SHOUTcast streams (and compatible), see Pulling Track Info From an Audio Stream Using PHP.

Community
  • 1
  • 1
Brad
  • 159,648
  • 54
  • 349
  • 530
0

I would suggest using ffprobe for this, more specifically the node-ffprobe module. But yeah, you would need to download the file and parse it through your server, AFAIK the video and audio tags can't hold metadata information yet.

pedromtavares
  • 763
  • 7
  • 11