www.makemkv.com

MakeMKV support forum
It is currently Thu Jul 19, 2018 5:07 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
PostPosted: Sat Dec 24, 2011 8:44 am 
Offline

Joined: Wed Nov 26, 2008 2:26 am
Posts: 3386
Starting with MakeMKV 1.7.0 , default track selection logic may be overridden in conversion profile. For information about conversion profile please see this post - viewtopic.php?f=10&t=4385 . Default selection logic is a property of particular track setting. For example, the relevant part of "default" profile reads
Code:
    <!-- Default rule - copy as is -->
    <trackSettings input="default">
        <output outputSettingsName="copy"
                defaultSelection="-sel:all,+sel:(favlang|nolang),-sel:(havemulti|havecore),=100:all,-10:favlang">
        </output>
    </trackSettings>
    <!-- Save LPCM mono or stereo as raw LPCM -->
    <trackSettings input="LPCM-stereo">
        <output outputSettingsName="lpcm"
                defaultSelection="-sel:all,+sel:(favlang|nolang),-sel:(havemulti|havecore),=100:all,-10:favlang">
        </output>
    </trackSettings>
    <!-- Put multi-channel LPCM into WAVEX container-->
    <trackSettings input="LPCM-multi">
        <output outputSettingsName="wavex"
                defaultSelection="-sel:all,+sel:(favlang|nolang),-sel:(havemulti|havecore),=100:all,-10:favlang">
        </output>
    </trackSettings>


UPDATE: Starting with version 1.7.3 default selection string may be overridden in MakeMKV preferences on Advanced tab. There is no need to edit profile XML file at all to change default selection logic, and multiple profiles can use the same default selection string from preferences.

This is only necessary for versions 1.7.0-1.7.2 :
To change default selection logic, one has to change rules in all 3 places, or at least the rule for "default" track. Please note that default profile should never be modified, please download attached profile template, edit the file and place into MakeMKV data directory in order to make it visible in MakeMKV. The exact rules of defaulSelection setting are posted below. Once again, do NOT download attached template if you're using latest version of MakeMKV, it's obsolete and there is no need to edit the profile file.


Attachments:
File comment: Profile template for 1.7.0
profile1.mmcp.xml [1.68 KiB]
Downloaded 1490 times
Top
 Profile  
 
PostPosted: Sat Dec 24, 2011 9:25 am 
Offline

Joined: Wed Nov 26, 2008 2:26 am
Posts: 3386
UPDATE: defaultSelection syntax changed in 1.7.1 and last updated in 1.7.3 . The information below is valid for MakeMKV v1.7.3 and above. Old syntax is still valid but its use is discouraged

defaultSelection is a string setting that is a comma-separated list of tokens. All tokens are evaluated from left to right. Each token has a format of {action}:{condition} . The defaultSelection name is confusing as actions control not only selection, but also order of tracks in output file. Currently supported actions are
Code:
+sel - select track
-sel - unselect track
+N   - add decimal value N to track weight
-N   - subtract decimal value N from track weight
=N  - set track weight to decimal value N

Track weight controls the position of tracks in output file. For detailed description please see viewtopic.php?f=10&t=4566 .

If the condition matches, the action applies. The defaultSelection expression is evaluated for each track, the initial track selection state and track weight are undefined. All tokens are always evaluated, from left to right.

The condition is a boolean expression that uses standard syntax. Tokens may be grouped by parentheses and all boolean operators are allowed. This is the list of all valid tokens
Code:
<!-- 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
    -->


This is the list of all valid operators
Code:
| - logical or
& - logical and
! - logical not
~ - alias for "!", logical not
* - alias for "&", logical and (as profile is an XML file, usage of "&" symbol is tricky)


Some common examples:

"+sel:all" - all tracks will be selected
"-sel:all" - no tracks will be selected

"-sel:all,+sel:(favlang|nolang),-sel:(havemulti|havecore),=100:all,-10:favlang" - select all tracks in favorite language, all tracks without language, do not select stereo tracks if multi-channel track is available in same language, unslect HD track if it has a core track, do not select any special tracks. Assign a weight value of "100" to all tracks by default, decrement weight value by 10 for all tracks in favorite language. This is a selection rule in default profile.

"+sel:(ger|fre)" - only select all German and French tracks. Both ISO-692 2B and 2T codes would work equally fine, so "+sel:(deu|fra)" would produce the same result.

+sel:(forced&(!eng)) - select all forced tracks, but not in English language.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group