[Finished] - ViewModeSwitcher for 1.4.0

Discussion in 'Area 51 - Testing Area' started by Owlsroost, June 19, 2013.

Thread Status:
Not open for further replies.
  1. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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: August 26, 2013
    • Like Like x 13
    • Thank You! Thank You! x 1
    • Dislike Dislike x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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: June 25, 2013
  4. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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.
     

    Attached Files:

    Last edited: August 2, 2013
  5. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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: June 30, 2013
  6. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,746
    Likes Received:
    1,420
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,849 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    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: June 19, 2013
  7. wouter1971
    • Premium Supporter

    wouter1971 MP Donator

    Joined:
    November 19, 2008
    Messages:
    911
    Likes Received:
    106
    Gender:
    Male
    Occupation:
    Security Officer
    Location:
    Purmerend, Holland
    Ratings:
    +143 / 6
    Home Country:
    Netherlands Netherlands
    Show System Specs
    @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.
     
  8. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,746
    Likes Received:
    1,420
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,849 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    if it's SBS 3D you should be able to non linear stretch if the AR>1.77 (ie black bars aren't encoded)
     
  9. wouter1971
    • Premium Supporter

    wouter1971 MP Donator

    Joined:
    November 19, 2008
    Messages:
    911
    Likes Received:
    106
    Gender:
    Male
    Occupation:
    Security Officer
    Location:
    Purmerend, Holland
    Ratings:
    +143 / 6
    Home Country:
    Netherlands Netherlands
    Show System Specs
    @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.
     
  10. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,746
    Likes Received:
    1,420
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,849 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    "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.
     
    • Great Idea! Great Idea! x 1
  11. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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: June 19, 2013
Loading...
Thread Status:
Not open for further replies.

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!