Conversion profiles

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
Locked
mike admin
Posts: 3402
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Conversion profiles

Post by mike admin » Sat Dec 24, 2011 8:33 am

Starting with version 1.7.0 MakeMKV uses a concept of "conversion profiles". Conversion profile is just a text file that describes how MakeMKV should process audio/video tracks and various MKV options. When expert mode is enabled, current profile may be changed in GUI after the disc is opened; or profile file name may be passed as --profile=filepath to makemkvcon . Note, that if MakeMKV detects multiple profiles, expert mode options in GUI are enabled automatically. In order to make a profile visible in GUI, the conversion profile file ( with .mmcp.xml extension ) must be placed into MakeMKV data directory which can be looked up and changed in preferences. MakeMKV always uses a conversion profile; when expert mode is disabled, a default conversion profile "default.mmcp.xml" is used, this file is located in MakeMKV application directory. This file should never be modified. Satrting with version 1.7.3 default selection string may be overridden in preferences, so there is no need to create a separate profile only to change default selection logic.

This is a work in progress, not all functionality is implemented. Do not assume that changing a certain section of profile will produce results you desire, unless you see specific confirmation that this setting is implemented and works.

Currently a profile has 4 sections - MKV settings, profile settings, output settings, track settings.

MKV settings specify the global settings for MKV file that are constant subject of holy wars.
"Should forced subtitles have "forced" flag set? Should the first track have "default" flag set? Should language be ISO-639 2B or 2T code?" - settings like these may be changed in profile. As of version 1.7.4 following settings are supported:

Code: Select all

ignoreForcedSubtitlesFlag      - never set "forced" flag for subtitle tracks. Default - true.
useISO639Type2T                - use ISO 639/2T instead of ISO 639/2B for language codes. Default - false.
setFirstAudioTrackAsDefault    - set "default" flag for a first audio track. Default - true.
setFirstSubtitleTrackAsDefault - set "default" flag for a first subtitle track. Default - true.
Profile settings are only supported after version 1.7.3 and specify settings that are set in profile but may be overridden in MakeMKV preferences. As of version 1.7.3 the only setting is a global default selection string.

Output settings are ignored by MakeMKV 1.7.2 and below. Starting with version 1.7.3 output settings are fully supported. Each output setting has an unique name and specifies output format (copy,save as LPCM,re-encode to FLAC, etc) and format-specific preferences (LPCM header type, FLAC compression level, etc).

Track settings specify which output setting should be applied per particular track type and default selection logic for this track type. For versions 1.7.0-1.7.2 only changing default selection logic is supported, please see this post for details - http://www.makemkv.com/forum2/viewtopic.php?f=10&t=4386 . Starting with version 1.7.3 it's also possible to assign any number of outputs per particular track type.
For example if two output settings (directCopy and FLAC) are assigned to a track type of TRUEHD, and a single output setting of type "directCopy" is assigned to track type of TRUEHD-core then for each True HD track MakeMKV will show three audio tracks in GUI - first being original track, second being core audio and third being original True HD track re-encoded to FLAC. MakeMKV will show the type of track and its output format on the right pane.

Below is the current profile XSD schema listing all possible track types and default selection tokens. This XSD is only valid for versions 1.7.4 and above.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xp="http://127.0.0.1/xp">

    <!-- input formats -->
    <xs:simpleType name="inputFormatType" xp:enum_base="1" xp:enum_invalid="0">
        <xs:restriction base="xs:token">
            <xs:enumeration value="default"/>
            <xs:enumeration value="Mpeg1"/>
            <xs:enumeration value="Mpeg2"/>
            <xs:enumeration value="Mpeg4"/>
            <xs:enumeration value="VC1"/>
            <xs:enumeration value="MP2"/>
            <xs:enumeration value="MP3"/>
            <xs:enumeration value="AC3-stereo"/>
            <xs:enumeration value="AC3-multi"/>
            <xs:enumeration value="DTS-stereo"/>
            <xs:enumeration value="DTS-multi"/>
            <xs:enumeration value="EAC3-stereo"/>
            <xs:enumeration value="EAC3-multi"/>
            <xs:enumeration value="MLP-stereo"/>
            <xs:enumeration value="MLP-multi"/>
            <xs:enumeration value="TRUEHD-stereo"/>
            <xs:enumeration value="TRUEHD-multi"/>
            <xs:enumeration value="TRUEHD-core-stereo"/>
            <xs:enumeration value="TRUEHD-core-multi"/>
            <xs:enumeration value="DTSHDMA-stereo"/>
            <xs:enumeration value="DTSHDMA-multi"/>
            <xs:enumeration value="DTSHDLBR-stereo"/>
            <xs:enumeration value="DTSHDLBR-multi"/>
            <xs:enumeration value="DTSHD-stereo"/>
            <xs:enumeration value="DTSHD-multi"/>
            <xs:enumeration value="DTSHD-core-stereo"/>
            <xs:enumeration value="DTSHD-core-multi"/>
            <xs:enumeration value="LPCM-stereo"/>
            <xs:enumeration value="LPCM-multi"/>
            <xs:enumeration value="FLAC-stereo"/>
            <xs:enumeration value="FLAC-multi"/>
            <xs:enumeration value="VOBSUB"/>
            <xs:enumeration value="VOBSUB-forced"/>
            <xs:enumeration value="VOBSUBHD"/>
            <xs:enumeration value="VOBSUBHD-forced"/>
            <xs:enumeration value="PGS"/>
            <xs:enumeration value="PGS-forced"/>
        </xs:restriction>
    </xs:simpleType>

    <!-- output formats -->
    <xs:simpleType name="outputFormatType" xp:enum_base="1" xp:enum_invalid="0">
        <xs:restriction base="xs:token">
            <xs:enumeration value="directCopy"/>
            <xs:enumeration value="LPCM-raw"/>
            <xs:enumeration value="LPCM-wavex"/>
            <xs:enumeration value="FLAC"/>
            <xs:enumeration value="VOBSUB"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="localizedString">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="lang" type="xs:string" use="optional" />
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <!-- named output settings -->
    <xs:complexType name="outputSettingsType">
        <xs:sequence>
            <xs:element name="description" type="localizedString" minOccurs="0" maxOccurs="unbounded" />

            <!-- FLAC settings -->
            <xs:element name="extraArgs" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="outputFormat" type="outputFormatType" use="required" />
    </xs:complexType>

    <!-- track settings -->
    <!-- defaultSelection tokens:
    all         - always matches
    xxx         - matches specific language (ISO 639-2B/T code - eng,fra,etc...)
    N           - matches if Nth (or bigger) track of the same type and language
    favlang     - matches favorite languages, always matches if no favorite language is set
    special     - matches if track is special (directors comments, childrens, etc)
    video       - matches if track is video
    audio       - matches if track is audio
    subtitle    - matches if track is subtitle
    
    video tracks:
    mvcvideo    - matches if track is a 3D multi-view video
    
    audio tracks, special tracks never match:
    mono        - matches if mono
    stereo      - matches if stereo
    multi       - matches if multi-channel
    havemulti   - matches if track is mono/stereo and there is a multi-channel track in same language
    lossy       - matches if non-lossless
    lossless    - matches if lossless
    havelossless- matches if non-lossless track, but there is a lossless track in same language
    core        - matches if this track is core audio, logical part of hd track
    havecore    - matches if this track is hd track with core audio
    
    subtitle tracks:
    forced      - matches if track is forced
    -->
    <xs:complexType name="trackSettingsType">
        <xs:sequence>
            <xs:element name="description" type="localizedString" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="output" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="description" type="localizedString" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                    <xs:attribute name="outputSettingsName" type="xs:string" use="required"  />
                    <xs:attribute name="defaultSelection" type="xs:string" use="required" />
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="input" type="inputFormatType" use="required" />
    </xs:complexType>
    
    <xs:element name="profile">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="name" type="localizedString" minOccurs="1" maxOccurs="unbounded"/>
                <xs:element name="mkvSettings">
                    <xs:complexType>
                        <xs:attribute name="ignoreForcedSubtitlesFlag" type="xs:boolean" use="optional" default="true" />
                        <xs:attribute name="useISO639Type2T" type="xs:boolean" use="optional" default="false" />
                        <xs:attribute name="setFirstAudioTrackAsDefault" type="xs:boolean" use="optional" default="true" />
                        <xs:attribute name="setFirstSubtitleTrackAsDefault" type="xs:boolean" use="optional" default="true" />
                    </xs:complexType>
                </xs:element>
                <xs:element name="profileSettings">
                    <xs:complexType>
                        <xs:attribute name="app_DefaultSelectionString" type="xs:string" use="optional" />
                    </xs:complexType>
                </xs:element>
                <xs:element name="outputSettings" type="outputSettingsType" maxOccurs="unbounded"/>
                <xs:element name="trackSettings" type="trackSettingsType" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    
</xs:schema>

Locked