ViewModeSwitcher plugin (Version 0.3) (1 Viewer)

lkuech

Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    52
    Hamburg
    Home Country
    Germany Germany
    Hi ziphnor.

    I would love to see our plugins become one. Under the line it is just a question how managed this by keeping the functionality of both.

    If I understand you plugin right, then your approach is a little bit different to what I was planning as I began developing my plugin.

    The Viewmodeswichter was originally not planned to do any frame analysation. As I described in the first post I just want to switch to a zoom-mode depending on the source video format. I use a additional zoom-mode here on my box which is based on the 14:9 mode but stretches the result to fit the screen (I guess its the same like this https://forum.team-mediaportal.com/patch_new_feature_new_zoom_mode_zoom-t25507.html). I want the plugin to use the mode on 4:3 broadcast and automatically switch back to normal or stretch when a 16:9 broadcast is detected.
    As I was ready with this I noticed that the only kind of signal that my plugin was not able to detect was a letterbox broadcast and because of this I integrated the letterbox detection.

    Because of potential subtitles you analyse the picture from the upper and lower edge to the center until you found some content and use the result to calculate a frame that fits the whole screen. If that is right, than that means that a CinemaScope movie (21:9) will be cropped on the left and right edges heavily if you don't have any subtitles.
    Here in Germany we don't have much subtiles and because of this it will look much better (from my point of view) if the "zoom" mode is used which keeps the black bars on the top and the bottom (on a 21:9 movie at least... with a 16:9 movie you will not have any bars at all).

    To keep the whole functionality of both plugins we may think about the following approach:

    We create a additional option (maybe a radio button, grouped with the letterbox option) for your autocrop function under the rule details of ViewModeSwitcher:

    here is the screenshot of such a rule detail:
    vms_v2_4_3.png


    On this way the users are able to choose which detection mode they want to use.
    The disadvantage for the users of your autocropper is that they have to create a rule first that enables the autocropping. The advantage is that the autocropping is only active if the current video (or broadcast) does fit the rule (important for HDTV broadcasts).

    The manual crop should be still available via a remote action.

    Maybe we should discuss this further at some other place. ;)

    PS: I have a much newer version of the viewmodeswitcher plugin here. It has a additional functionality to move the picture up and down while watching. You are also able to store a vertical offset for a special channel (to see the news banner of a news channel for example). The plugin is able to detect channel chances now and resets the letterbox detection and so on...
    Unfortunately this has also a disadvantage... because I want to support the old and the new tvengine it was necessary to build a helper.dll (a wrapper) for each. And the users have to copy the right dll to there plugins folder.

    Bye
    Lars
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Because of potential subtitles you analyse the picture from the upper and lower edge to the center until you found some content and use the result to calculate a frame that fits the whole screen. If that is right, than that means that a CinemaScope movie (21:9) will be cropped on the left and right edges heavily if you don't have any subtitles.

    The autocropper only computes the bounds of the actual video in the frame (no cropping of actual video content!), it doesnt decide how to display it, i leave that to the Zoom modes defined in Geometry.cs.

    So, if you mean a 21:9 letterbox in a 4:3 transmission (without subs), then it wouldnt get cropped left and right (depending on the active zoom mode). The autocropper would compute a 21:9 bounding box and if you use the Normal zoom mode then you would still get some black bars top and bottom (because its wider than the 16:9 display). If you use the Stretch mode you would get a fullscreen image with people looking a bit tall, while Zoom would crop the 21:9 image to a 16:9 image by cutting left and right sides off.

    Thats also why it could detect 21:9 or 16:9 material (without subs), because the resulting bounding box will have those approx. aspect ratios.

    Earlier on i wrote the autocropper in C++ and actually had some experimental code there for autodetecting subtitles and moving them into the letterbox, allowing for better zoom. It was costly though, and was also a bit jittery ;)

    Basically i was thinking that if we were to merge, i would simply take care of the frame analysis and you use the result in which ever way you see fit :)

    Btw, as you mention we might want to discuss this elsewhere and you should also be aware that i will be travelling (combined business and holiday) starting from a few days and lasting about a month, so things will probably have to wait until i get back.
     

    lkuech

    Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    52
    Hamburg
    Home Country
    Germany Germany
    Btw, as you mention we might want to discuss this elsewhere and you should also be aware that i will be travelling (combined business and holiday) starting from a few days and lasting about a month, so things will probably have to wait until i get back.
    That is absolutely ok with me. My development time is rather limit right now. But better times will come soon... I hope. And I have to finish my WorldMap plugin as well... so ... have a nice travelling and try to keep the holiday part as the main part of your trip ;)

    Bye
    Lars
     

    stanik

    Portal Pro
    October 10, 2006
    146
    4
    Home Country
    Czech Republic Czech Republic
    Hi a thak you Lars,

    your plugin is great and working like a charm :).

    I have question?

    I still using old TVengine (TVE2) because is more stable and picture quality is better thne new TVE3 (and dont need MS SQL :)).

    I have a rule with min. max value of width and height set on 0 and zoom mode is 14to9 (best for 4:3 TV on wide plasma).

    Working perfect.

    I try second rule with same values (0 and 0) but with 16:9 detection and zoom modet set to ZOOM. This rule not work, when first rule (14:9) is enabled.

    So my question is can I use this two rules together?

    And I am found one bug: If I set zoom mode to different - for example ZOOM - Start Mp and have Original zoom mode set. Ok start confihure of MP and set PanScan43 - close - start MP and have ZOOM set - thats wierd.
    Only if i set 14:9 thats works how was sets and hold.

    Thx for answers.
    Stanik
     

    lkuech

    Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    52
    Hamburg
    Home Country
    Germany Germany
    stanik: It looks like the current version of the viewmode switcher has some problem with the SVN's sice there was some change regarding the zoom modes. The problem seems to be gone if I recompile the plugin against the current SVN... but I'm not sure how the 0.2.3.0 RC1 behaves then...

    If I found the time, I will post a "work in progess" version (0.3) of the plugin. Most likely your bug will be gone with that version.

    To help you with your rules: Please enable the verbose logging and post your mediaportal.log after watching 4:3 and 16:9.

    Bye
    Lars
     

    stanik

    Portal Pro
    October 10, 2006
    146
    4
    Home Country
    Czech Republic Czech Republic
    Thank you.

    So here is my Mediaportal.log

    For undrerstanding: Always watching analog TV with TV2 engine (old). Both my rules have 0 - 0 set for min max w/h. One is for switch to 14:9 (work everytime), second have leterbox scan and is set for ZOOM (doesnt work).

    Looking forward your answer :)
     

    lkuech

    Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    52
    Hamburg
    Home Country
    Germany Germany
    stanik: I've looked in your log file. If I don't overlooked something, then you do only receive 4:3 signals. This means you do need only one rule which is automatically switching to 14:9 if it fits (AspectRatio 1,333333). In this rule you activate the letterbox detection.
    If the plugin detects a letterbox signal it will automatically switch to "zoom". And it switches back if the letterbox is gone.

    The switching to "zoom" is hardcoded if the letterbox detection is enabled, because of the you don't need a seconds rule

    Bye
    Lars
     

    stanik

    Portal Pro
    October 10, 2006
    146
    4
    Home Country
    Czech Republic Czech Republic
    THX.

    Só second rule was deleted and first role was modified with letterbox check, but not work. Nothing.
    Log is attached
     

    lkuech

    Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    52
    Hamburg
    Home Country
    Germany Germany
    Mhh... Are you sure that the letterbox detection is enabled and the "disable LB detection globally" is not checked?
    I can't see anything about the letterbox detection in your log. The rule parameters themself seem to be fine.

    Maybe it is a good idea to post a screenshot of your configuration (rule & the main screen).

    Bye
    Lars
     

    Users who are viewing this thread

    Top Bottom