Changing default track selection

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

Changing default track selection

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

⇊⇊⇊ scroll down ⇊⇊⇊

mike admin
Posts: 4075
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: Changing default track selection

Post by mike admin » Sat Dec 24, 2011 9:25 am

Starting with MakeMKV 1.7.3 , default track selection logic may be specified in MakeMKV preferences on Advanced tab. 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: Select all

+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 http://www.makemkv.com/forum2/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: Select all

<!-- 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: Select all

| - 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.

In addition to the value set in preferences, default track selection may be overridden or amended in conversion profile. For information about conversion profile please see this post - http://www.makemkv.com/forum2/viewtopic.php?f=10&t=4385 . Default selection logic is a property of particular track setting, so this allows one to override the default selection logic for specific tracks, based on input or output format (essentially per input or output codec).

Locked