Is this possible to store video/audio metadata (like duration, width, height) in a CCK FileField data field (like alt and description) or in some CCK text field, or accessible from tokens?

Would be a great feature.

Comments

arthurf’s picture

Yes it would be possible. The problem is knowing how to map the meta data to arbitrary field names. Conceivably one could build a straight forward interface for this built off the data that flvtoo2 returns, but at the moment that doesn't exist.

However if you're using mm_flvtool2, in the $node->media_mover[CONFIGURATION_ID][MM_FID]['data']['flv_meta'] you will have access to all of the flv's meta data that is generated by flvtool2

delykj’s picture

"However if you're using mm_flvtool2, in the $node->media_mover[CONFIGURATION_ID][MM_FID]['data']['flv_meta'] you will have access to all of the flv's meta data that is generated by flvtool2"

We are not using flvtool2, because we couldn't use Ruby. But FFMPEG could return duration, video width, height data, sou we could use FFMPEG to get metadata.
Would be great to create a new module that could harvest from a CCK field or from file attachment, get the metadata from that field using FFMEG and store the data into a FileField's data (like filefield_meta module does).

arthurf’s picture

Ah, yes, we've got that as well. From mm_ffmpeg

  // get any meta data for this file
  $file['data']['file']['meta'] = ffmpeg_wrapper_file_data($output_file);

So node->media_mover[CONFIGURATION_ID][MM_FID]['data']['file']['meta'] will have all the data produced by ffmpeg_wrapper_file_data() which should be what you need.

delykj’s picture

Status: Active » Closed (fixed)

Thanks, Arthurf!

najibx’s picture

Hi,
Could you be more specific in getting metadata via mm_ffmpeg such as Title, tags, duration, comment, producers, artists, .... from all harvested files either via FTP/folder and then create node for each file after harvesting. I imagine, first, you must create CCk fields, then how you map mm_ffmpeg metadata to the respective cck field.

Right now, i'm just getting the same title for all my nodes created. thanks