Code: Select all
<codecs>
<audio>
...
<encoder name="Vorbis">
<keybase>audioenc.vorbis</keybase>
<input type="pcm"/>
<extname>ogg</extname>
<verinfo begin="ERROR:" end="*"/>
<path key=".path"/>
<if stdin="true">
<arg>-r -C $(Channels) -R $(SampleRate) -</arg>
</if>
<if stdin="false">
<arg>$(SourceFile)</arg>
</if>
<arg>-o "$(DestFile)" --quiet</arg>
<arg key=".resample">--resample</arg>
<arg key=".downmix">--downmix</arg>
<arg key=".minBitrate" prefix="-m"/>
<arg key=".maxBitrate" prefix="-M"/>
<if test=".mode" value="Quality">
<arg key=".quality" ratio="0.01" prefix="-q"/>
</if>
<if test=".mode" value="Bitrate">
<arg key=".bitrate" prefix="-b"/>
</if>
<arg key=".options"/>
<if tagging="true">
<arg>-t "$(Title)" -a "$(Artist)" -l "$(Album)" -N "$(Track)" -d "$(Year)" -G "$(Genre)"</arg>
</if>
</encoder>
...
</audio>
</codecs>
<keybase>: It defines the base parameter node of of the audio encoder. All the parameter keys referred for this encoder later which started with a dot will be composed with the base key to form the final one.
<input>: This defines what kind of input does the audio encoder prefer. There are 3 types: pcm (feed encoder with pcm data), wav (feed encoder with pcm data and wav header), (feed encoder with input file name and let it decode) file. If not specified, default is wav.
<extname>: This specifies the output file extension.
<path>: This defines the key that contains the encoder path. All keys are defined in mccore.xml.
<arg>: This will append an argument in the command line. If "key" attribute is specified, the value of the key will be automatically referenced to form the final option.
<if>, <ifnot>: This tests the condition specified with attribute "test" and "value". Other useful attributes are: tagging (whether tags should be added), stdin (whether use stdin to feed data) channels , samplerate etc.
If you need more options to be supported by an existing encoder, first add the parameter keys in mccore.xml in some position and modify mccodecs.xml to add <arg> or other necessary tags. Remeber you can switch to expert UI mode so as to observe the change of command line on changed of MediaCoder parameters.