[Finished] ViewModeSwitcher for 1.4.0 (1 Viewer)

Status
Not open for further replies.

Owlsroost

Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    • Thread starter
    • Moderator
    • #1
    This plugin is included in MP 1.5.0 and later versions

    Since the current ViewModeSwitcher plugin is not fully compatible with MP 1.4.0, and has a few long-standing issues/problems, I decided it was time to update it and improve it

    New features:
    • Auto (continuous) black bar detection capabilty - updated every second
    • Improved black bar analysis and sanity checking - to reduce mis-detections
    • A 'maximise' crop option (allows up to 12% to be cropped off the 'picture' to increase the black bar cropping)
    • Black bar detection mode toggle and single-shot detection using key mappable 'actions'
    • Allows user override of view mode when video playing
    • More flexible handling of '4:3 inside 16:9' (pillarbox) and '16:9 inside 4:3' (letterbox) video

    Sources are now in MP1 master branch - https://github.com/MediaPortal/MediaPortal-1/tree/master/mediaportal/ProcessPlugins/ViewModeSwitcher - so will be a standard part of MP 1.5.0 onwards.
     
    Last edited:

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    • Thread starter
    • Moderator
    • #2
    What does it do ?

    • It uses the video aspect ratio and size information to automatically change the 'Zoom Mode' to a mode you select.
    • It does this by comparing the video information with a set of 'rules' (which can be changed by the user)
    • If the aspect ratio and the video size match one of the 'rules', it then changes the current 'Zoom mode' to the one in the rule.
    • It can (optionally) also search the video content for 'Black Bars' at the sides or top and bottom of the picture. This can be enabled on a per-rule basis (so you can enable it for SD but not HD content, for example).
    • The Black Bar detection can either be continuous (every second) or triggered once when play is started (or after a TV channel change).
    • If it finds black bars, it will try and remove (crop) them without removing too much of the actual picture content.
    • There are special rules (which have negative 'AR From' and 'AR To' settings) which allow you to choose a 'Zoom Mode' for Letter Boxed and Pillar Boxed video. These special rules are only used if Black Bar detection is enabled.

    (To be continued....)
     
    Last edited:

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    • Thread starter
    • Moderator
    • #3
    To install:

    Close MP, go to C:\Program Files\Team MediaPortal\MediaPortal\plugins\process and make a backup of the 'ProcessPlugins.dll' file.

    Replace it with the new dll from the zip file attached here.

    Open MP Configuration tool -> Plugins, select and enable ViewModeSwitcher, then click on 'Config' to open the VMS config window. Click OK, and then click OK to close the main Configuration window and save the default settings.

    If you need to restore the default settings, go to C:\ProgramData\Team MediaPortal\MediaPortal and delete the 'ViewModeSwitcher2.xml' file, then open MP Configuration tool etc. as above, or extract the files from the 'Default_VMS2_v2_settings_files.zip' below and use the 'Import Settings' button to load either 'Default_for_16x9_display.VmsSettings' (if you have a widescreen display) or 'Default_for_4x3_display.VmsSettings' (if you have a classic 4:3 format display).

    EDIT: Second version (v2) uploaded - compatible with MP 1.4.0 only. This has several bug fixes and new default settings for 21:9 video, but in order to fix a system language problem with the 'AR To' and 'AR From' settings, I've had to break backward compatibility for those settings with the first version. This means that the new version will load your old settings, but all the 'AR To' and 'AR From' fields will be reset to default values so please make a note of the old AR values before you update to v2. Alternatively completely restore to defaults using the new (v2) default settings files and then recreate your old settings.

    EDIT: Added user settings files from wouter1971 and kiwijunglist

    EDIT: Third version (v3) uploaded - compatible with MP 1.4.0 only.This is mostly a major rework of the user interface, including adding a 'Load Defaults' button and hiding the advanced settings normally. Also added many 'advanced' settings to the GUI (I'll explain what they do later ;) )

    EDIT: kiwijunglist settings updated.

    EDIT: Fourth version (v4a) uploaded - compatible with MP 1.4.0 only.This is a small rework of the user interface - any 'rule' can be enabled/disabled using the tick boxes in the main window, the window is now horizontally re-sizeable, and the 'Esc' key can be used as a 'Cancel' button.
     

    Attachments

    Last edited:

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    • Thread starter
    • Moderator
    • #4
    Below is shown the settings window with the default settings (which are optimised for 16:9 widescreen displays - see post above for alternative default settings file optimised for 4:3 displays)

    These defaults enable auto black bar detection for SD content (and letterbox/pillarbox detection), but disables it for HD content (since it can cause stuttering on low performance systems).

    The last two rules ("4:3 inside 16:9" and "16:9 inside 4:3") with negative 'AR From' and 'AR To' values are only used when pillarbox (left/right bars) or letterbox (top/bottom bars) are detected - these allow you to select a view mode for these situations e.g. NonLinearStretch for "4:3 inside 16:9", or Zoom14to9 for "16:9 inside 4:3"

    VMS_140_settings.png


    The two mappable key 'actions' (see MP config->general->keys and sounds) are:

    ACTION_AUTOCROP // Request new single-shot black bar detection
    ACTION_TOGGLE_AUTOCROP // Toggle detection mode: off/auto - mapped to keyboard 'F4' by default

    The 'Rule' settings

    • AR From, AR To - VMS checks if the video aspect ratio is between the 'From' and 'To' values
    • MinWidth, MaxWidth - VMS checks if the video width is between the 'Min' and 'Max' values
    • MinHeight, MaxHeight - VMS checks if the video height is between the 'Min' and 'Max' values
    If the video passes ('matches') all the checks above then that rule is chosen, and it then uses the following settings:
    • ZoomMode - which MP 'ZoomMode' to use
    • Overscan - how many pixels to crop from the edges of the picture as a minimum.
    • BB Detect On - enables Black Bar detection.
    • Auto BB - If 'True' then Black Bar detection will be performed every second. If 'False' then only detect once after start-of-play or a TV channel change.
    • Max Crop - maximise the Black Bar cropping when 'True' i.e. allow it to crop upto 12% from the 'good' picture to enable more black bar to be removed.

    I'll expand this section later.....
     
    Last edited:

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,749
    New Zealand
    New Zealand New Zealand
    Country flag
    Suggestion:
    Untitled-1.jpg

    When clicked are you sure dialog box?
    16:9 resets to above.
    4:3 uses 4:3 optimized settings

    Reasoning
    1. If people screw up their settings (which they will) can reset to default
    2. 4:3 optimized settings are different (4:3 = normal, 16:9 = zoom14.9, others same)
    3. Easier for users + no need to post settings for 4:3 in thread.
    4. Easier support - If user having problems, first support suggestion can be reset to default :) Can ensure that they are infact using the default settings

    NB. Text should probably be "Load optimized settings for" "Reset to default settings for"
     
    Last edited:

    wouter1971

    MP Donator
  • Premium Supporter
  • November 19, 2008
    911
    143
    Purmerend, Holland
    Netherlands Netherlands
    Country flag
    @Owlsroost: Thanks for this major upgrade of viewmodeswitcher. I think there is no more reason to use IFC anymore. Pitty but it was not maintained anymore.
    I have a feature question. As a frequent viewer of 3D videos i would love to see an option to make removing black bars work within 3D Side by Side (and Top/Bottom) videos. That way we can get the image full screen instead of movie format. Is that possible to do? In combination with Auto 3D plugin of Marcus this would be a nice addition.
     

    wouter1971

    MP Donator
  • Premium Supporter
  • November 19, 2008
    911
    143
    Purmerend, Holland
    Netherlands Netherlands
    Country flag
    @kiwijunglist: Thanks for the sugestion and i will check but i think it will not work. Mediaportal sees 3D SBS as one frame right? So if you remove the black bars you just get a long image. It must be able to zoom in on both halves of the image and cut the sides of.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,749
    New Zealand
    New Zealand New Zealand
    Country flag
    "non linear stretch", try it. It's not zoom so doesn't have to cut anything. but it depends on the AR>1.77

    eg. if video = 1920x1080 then it wont work, if video = 1920x817 then it will work.
     

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    • Thread starter
    • Moderator
    • #10
    Suggestion:
    View attachment 130879

    When clicked are you sure dialog box?
    16:9 resets to above.
    4:3 uses 4:3 optimized settings

    Reasoning
    1. If people screw up their settings (which they will) can reset to default
    2. 4:3 optimized settings are different (4:3 = normal, 16:9 = zoom14.9, others same)
    3. Easier for users + no need to post settings for 4:3 in thread.
    4. Easier support - If user having problems, first support suggestion can be reset to default :) Can ensure that they are infact using the default settings

    NB. Text should probably be "Load optimized settings for" "Reset to default settings for"
    Nice idea, but the problem I have is that the version of VisualStudio I use (the free VS2010 Express) can't create/edit the dialogs, so I can't add/delete/move controls.

    I'll post some 'settings' files which people can import for 16:9 and 4:3 display 'optimised' settings (done - see second post in thread)
     
    Last edited:
    Status
    Not open for further replies.

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom