AnsweredAssumed Answered

Custom Transformations

Question asked by konsultex on Feb 12, 2009
I the past I configured a custom transforation from Autocad DWG files to PDF by configuring just 2 xml files: mimetypes-custom-extension.xml and transformers-custom-context.xml. Right now I need to define a transformer from .wav to .mp3 files. For this I am using LAME ( and I have it working from the command line in Windows. I defined this section in mimetypes-custom-extension.xml

         <mimetype mimetype="audio/x-mpeg" display="Audio mp3">
            <extension default="true">mp3</extension>

and this in transformers-custom-context.xml

      <property name="transformCommand">
         <bean class="org.alfresco.util.exec.RuntimeExec">
            <property name="errorCodes">
            <property name="commandMap">
                    <entry key="Linux">
                        <value>lame ${source} ${target}</value>
                    <entry key="Windows.*">
                        <value>lame.exe ${source} ${target}</value>

I had the checkCommand property to verify that Alfresco picks this up and it worked fine.

My problem is that when I define a new content rule I can pick the "WAV audio" as the source mime type but when I get to picking the destination format I don't see "mp3" or anything like that in the list. The destination list is much shorter than the source mime type list. I did not have this problem with DWG to PDF because PDF is one of the formats in the destinaton list.I also tried to put this bit into web-client-config-custom.xml after reading in the wiki (

<config evaluator="string-compare" condition="Action Wizards" replace="false">
      <transformer name="audio/x-mpeg"/>

but it made no difference. Maybe I'm not understanding what has to go after "transformer name =".

In this case I am still using Alfresco 2.1 but I assume that the procedure did not change for 3.0.

What else and where else do I have to configure something to get "mp3", "Audio mp3" or "audio/x-mpeg" to appear in the destination?