Multimedia conversion formats

The formats the multimedia module converts to are configurable in the multimedia.xml config file.

<?xml version="1.0" encoding="utf-8" ?>
<multimedia>
    <video>
        <format name="{id}.flv">
            <option name="f" value="flv" />
            <option name="acodec" value="libmp3lame" />
            <option name="ar" value="44100" />
            <option name="ab" value="64k" />
               <option name="ac" value="2" />
           </format>
           <format name="{id}.mp4">
               <option name="r" value="30" />
      <option name="ar" value="44100" />
            <option name="ab" value="64k" />
            <option name="ac" value="2" />
        </format>
    </video>
       <audio>
           <format name="{id}.mp3">
            <option name="sameq">
        </format>
    </audio>
</multimedia>

The <multimedia> element is the root element of the configuration, and acts as a container to the rest of the configuration elements. The multimedia element should contain both <video> and <audio> child elements. Both the <video> and <audio> elements can contain multiple <format> child elements. The <format> element describes how the source file should be converted.

Example:

<?xml version="1.0" ?>
<format name="{id}.mp4" input="{id}.flv" ignore-input-codec="flv" tool="ffmpeg">
    <option name="r" value="30" />
    <option name="ar" value="44100" />
</format>

Attibutes:

Attribute Required Description
name Yes The name of the output file. The "{id}" placeholder will be replaced by the ID of the MultimediaItem being converted.
input No (defaults to the source file) The name of the input file. The "{id}" placeholder will be replaced by the ID of the MultimediaItem being converted. For example, we may want to use the output of another format as the input.
ignore-input-codec No If the input source codec matches the value of this attribute then the source file willl be copied with the output name instead of re-converting. Used to prevent ffmpeg stripping ID3 tags from MP3 files.
tool No (defaults to ffmpeg) The tool to use for the conversion. Either "ffmpeg" or "ffmpeg2theora"

A format can have multiple options, which are used as command line arguments of the tool. For example if a format has the options:

<?xml version="1.0" ?>
<format name="{id}.mp4">
    <option name="r" value="30" />
    <option name="ar" value="44100" />
</format>

The command will contain the option string, -r 30 -ar 44100. Values will be escaped before excuting the command.

Attributes:

Attribute Required Description
name Yes The name of the option
value No The option value

results matching ""

    No results matching ""