cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco for audio / video file management?

christophd
Champ in-the-making
Champ in-the-making
Hi all,

just a quick question:

How well does Alfresco (running community edition 3.2 at the moment) support content management of audio and video files?

I just tried uploading a random sound sample to Alfresco and the upload seems to work fine yet I can't find the file when using the search functionality in the browser based Share component. Additionally since I uploaded the audio files the document library seems to get stuck at "Loading the Document Library…" (only in IE8 though, Chrome seems to do fine).

Regardless of the browser I can access the files via the "Recently Modified Documents" dashboard component though there it says under Metadata: "Not enough configuration found for item "cm:content", at least one <show> element must be present."

So I'm somewhat confused with regard to the default capabilities when it comes to audio / video file formats. Are there plugins or extensions for example to do things like reading an .MP3 file's ID3 tags and putting them into the metadata field of the Document Library?

Any pointers, comments and advice are much appreciated!

Thanks in advance,
Christoph
12 REPLIES 12

mikeh
Star Contributor
Star Contributor
Although we should be able to support upload and download of audio and video content (not sure about that IE8 error you're seeing), there won't be any useful transformations or metadata extractions out-of-the-box.

You can add your own (or hope somebody else has done so for you). I know someone here has put together an experimental video transformer using ffmpeg, so you might be able to find something similar for audio.

Please refer to: http://wiki.alfresco.com/wiki/Metadata_Extraction

Thanks,
Mike

christophd
Champ in-the-making
Champ in-the-making
Thanks again for the information Mike!

Where would I look whether anyone has done something wrt audio / video metadata extraction as I haven't found any specific solutions here in the forums so far.

Also would it be possible to extract audio metadata such as ID3 tags via a regular command-line tool and then putting it into an ACP file with an accompanying XML file?

Cheers,
Christoph

min
Champ in-the-making
Champ in-the-making
The documentation I found shows that it should be able to extract MP3 metadata. 

http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/content/metadata/MP3Metadata...

public class MP3MetadataExtracter
extends AbstractMappingMetadataExtracter

Extracts the following values from MP3 files:

   songTitle:              –   {music}songTitle, cm:title
   albumTitle:             –  {music}albumTitle
   artist:                 –      {music}artist, cm:author
   description:            –   cm:description
   comment:                –  {music}comment
   yearReleased:           – {music}yearReleased
   trackNumber:            – {music}trackNumber
   genre:                  –      {music}genre
   composer:               –   {music}composer
   lyrics:                 –        {music}lyrics

I just tried to load a MP3 that had ID3 tags using the default community installation and the file loads, but without the metadata (as expected).  I then ran the Extract Common Metadata action on the file, still no metadata is visible on the properties screen.  Perhaps the metadata was extracted, but is not visible on the property screen because they haven't been exposed.  Will check into this.

On another note, when I tried to run the Extract Common Metadata action on an MP3 file that is not ID3 tagged.  I receive an error message saying "null" encountered and the process does not complete.

christophd
Champ in-the-making
Champ in-the-making
Thanks a lot for the information, much appreciated:-)

min
Champ in-the-making
Champ in-the-making
I got to the bottom of why the ID3 data was not appearing.  The default MP3 extractor only pulls Song Title, Artist and Description ( a concatonation of artist + album + trackname).  To pull additional fields you must have added the additional fields to your model and webclient interface and then configured custom-metadata-extractors-context.xml in the extensions directory. 

A few notes:

1.  I could never get the lyrics field to extract
2.  Genre is stored in the MP3 ID3 tag as a code which represents the genre name.  Example, Rock = 17, Jazz = 8.  So don't expect to see the genre name after you extract. 
3. Many ID3 fields are not available to be pulled using the currently included extractor (e.g., track length)

4. Whenever I set "inheritDefaultMapping" to false I would receive a runtime error ("Null") when executing the metadata extraction action and the extraction would not complete.  Bug?

5. Whenever I set "overwritePolicy" to EAGER I would receive a runtime error ("Null") when executing the metadata extraction action and the extraction would not complete.  Bug?  I ended up not specifying this parameter at all.

jsauer
Champ in-the-making
Champ in-the-making
Happy New Year fist off all,
I just wonder why ID3 tag extraction does not work on my system?

Alfresco Community 3.2.r.2 on Windows full installation bundle.
I configured a custom model. Configured the extractor mappings but nothing happens.

Tried to set a breakpoint in MP3MetadataExtracter.extractRaw() but the method never fires 😞

I checked the other extractors. There the extractRaw() method is being called.

The mp3 files I uploaded definitely have id3 tags set. The mime type is being detected as MPEG Audio and a custom document type with the mp3 metadata aspect was selected.

Any clues? Do I need to setup / install an additional component / jar to make this work?

Thanks
Jörg

min
Champ in-the-making
Champ in-the-making
Using community v3.2, no additional components were needed to be installed.

When you say it doesn't work, are there any errors generated in the log? 
You didn't mention it, but are you running the common extraction action on the MP3?

A few things to double check:

1. custom extractors config file is being found in the extensions directory
2. Set inheritDefaultmapping = true in the extraction config file and
3. do not include the overwrite policy parameter

jsauer
Champ in-the-making
Champ in-the-making
Hi,
sorry for the delay. Was kind of busy…

No errors in log. No clues at all so far…

spring context:

    <bean id="extracter.mp3"
          class="org.alfresco.repo.content.metadata.MP3MetadataExtracter"
          parent="baseMetadataExtracter" >
        <property name="mappingProperties">
            <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
               <property name="location">
                  <value>classpath:alfresco/extension/mp3Model-extractor-mappings.properties</value>
               </property>
            </bean>
        </property>
    </bean>

mapping properties:

namespace.prefix.mp3=mp3.model
songTitle=mp3:songTitle
albumTitle=mp3:albumTitle
artist=mp3:artist
description=mp3:description
comment=mp3:comment
yearReleased=mp3:yearReleased
trackNumber=mp3:trackNumber
genre=mp3:genre
composer=mp3:composer
lyrics=mp3:lyrics

Model:

   <namespaces>
      <!– Define a Namespace for my new definitions–>
      <namespace uri="mp3.model" prefix="mp3"/>
   </namespaces>

   <!– Type and Aspect definitions go here –>
   <types>
      <type name="mp3:audioFile">
         <title>Audio File</title>
         <parent>cm:content</parent>
         <mandatory-aspects>
           <aspect>mp3:MP3Metadata</aspect>
         </mandatory-aspects>
      </type>
   </types>
   <aspects>
      <aspect name="mp3:MP3Metadata">
         <title>MP3 Metadata</title>
         <properties>
            <property name="mp3:songTitle">
               <type>d:text</type>
            </property>
            <property name="mp3:albumTitle">
               <type>d:text</type>
            </property>
            <property name="mp3:artist">
               <type>d:text</type>
            </property>
            <property name="mp3:description">
               <type>d:text</type>
            </property>
            <property name="mp3:comment">
               <type>d:text</type>
            </property>
            <property name="mp3:yearReleased">
               <type>d:text</type>
            </property>
            <property name="mp3:trackNumber">
               <type>d:text</type>
            </property>
            <property name="mp3:genre">
               <type>d:text</type>
            </property>
            <property name="mp3:composer">
               <type>d:text</type>
            </property>
            <property name="mp3:lyrics">
               <type>d:text</type>
            </property>
         </properties>
      </aspect>
   </aspects>
</model>

Web UI configured to display the aspects properties. No problems with this, can also edit the ID3 tags manually.

Any clues?

will test on my linux box later today. Will post an update on this then…

Thanks
Jörg

min
Champ in-the-making
Champ in-the-making
I have two additional properties specified, not sure if that will help:

   <property name="inheritDefaultMapping">
            <value>true</value>
        </property>
      <property name="failOnTypeConversion">
            <value>false</value>
        </property>

I also specified my mp3 properties inline, not through a properties file.