ViewModeSwitcher plugin (Version 0.3) (3 Viewers)

lkuech

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

    The idea of the boxes is that they are always centered. That means if you set the box width to 30%, there are 35% on the left and 35% on the right of the box that's not analysed. The most broadcasters have their logos in corners of the upper black bar so it is necessary to analyse only the middle part of a black bar.

    The startpos is a kind of an offset. Some broadcasters send "garbage" in the first lines of their signal (i.e. teletext). Because of this it is important to define a box to analyse that does not contain this "crap" ;)

    The centerbox has the job to make the detection more reliable. Just analyse the top and/or bottom bar is a bit critical, because even programs without letterboxes have from time to time "black content" in the analysed boxes (i.e. during an intro of an movie where the whole screen is black with only some words in the middle).
    The letterbox detection is only allowed to change from activate to deactive (or the other way around) if the centerbox is not black and the upper or bottom box is black...

    I hope that explains it a bit

    Bye
    Lars
     

    ketjap

    Portal Member
    July 28, 2008
    33
    1
    47
    Home Country
    Netherlands Netherlands
    Hi lkuech,

    Thank you for your explanation. It's more clear for me now.

    Here in The Netherlands the logo's are not in the black box, so that's a bit different in our countries. Now that I changed it to 70% it works great for me. With some shows there is not really a letterbox in the middle of the screen, not in the 25% area. That area looks black and outside that area there is something from the image so it shouldn't be zoomed. (Don't know how to explain this better). As I said, I changed it to 70% Width and till now it always choose the correct zoom mode.

    Again, great plugin! Thank you for your good work.
     

    Wurlitzer

    Portal Member
    October 30, 2008
    41
    1
    Home Country
    Germany Germany
    Please explain..., some help!

    I just installed your plugin. THX for your hard work!
    I'm using an "old" analog CRT (4:3) with a fireDTV-S2 -Card, Vista 32Bit SP1 at a Radeon 34xx Graphics Card (S-VHS) I tested and found no entries in my logfile like "video AR..."

    Please look at the attachment. The logfile is from my second pc. (Using a multiseat installation with whs).
    I'm not right, if i just understand all...?

    Thank you for your support!
    :)
     

    piranhabox

    New Member
    November 24, 2008
    1
    0
    Home Country
    Germany Germany
    Hi,
    at first thanks for this tool.
    thats something i searched for a long time.
    but i'm a noob, could somebody give me a config for:

    res = 1.366 x 768 (Lg42" LCD)
    4:3 = real 4:3 without stretching (cut on left and right)
    16:9 = 16:9

    thanks too all and the developer!

    cd
     

    ketjap

    Portal Member
    July 28, 2008
    33
    1
    47
    Home Country
    Netherlands Netherlands
    Hi piranhabox,

    The resulution you give is probably the res of your monitor and not the res of the stream. If you read the first post a couple of times you can figure it out how it works.
     

    baldur

    MP Donator
  • Premium Supporter
  • March 30, 2008
    33
    1
    Home Country
    Germany Germany
    Configuration Help

    Hi!

    I have just reinstalled my MP and now I'm lost...How shall I set up the viewmodeswitcher with those parameters:

    2008-12-07 12:56:32.875000 [Debug][VMRenderer]: PlaneScene: crop T, B : 0, 0
    2008-12-07 12:56:32.875000 [Debug][VMRenderer]: PlaneScene: crop L, R : 0, 0
    2008-12-07 12:56:32.890625 [Info.][VMRenderer]: PlaneScene: video WxH : 720x576
    2008-12-07 12:56:32.890625 [Debug][VMRenderer]: PlaneScene: video AR : 1024:576
    2008-12-07 12:56:32.890625 [Info.][VMRenderer]: PlaneScene: screen WxH : 1280x720
    2008-12-07 12:56:32.890625 [Debug][VMRenderer]: PlaneScene: AR type : Normal
    2008-12-07 12:56:32.890625 [Debug][VMRenderer]: PlaneScene: PixelRatio : 1
    2008-12-07 12:56:32.890625 [Debug][VMRenderer]: PlaneScene: src : (0,0)-(720,576)
    2008-12-07 12:56:32.890625 [Debug][VMRenderer]: PlaneScene: dst : (0,0)-(1280,720)
    2008-12-07 12:56:33.437500 [Info.][ViewModeSwitcherThread]: Processing the fallback rule!
    2008-12-07 12:56:33.437500 [Info.][ViewModeSwitcherThread]: Using overscan: 0
    2008-12-07 12:56:33.453125 [Info.][ViewModeSwitcherThread]: PlaneScene: Crop: top:0, bottom:0, left:0, right:0
    2008-12-07 12:56:33.453125 [Info.][ViewModeSwitcherThread]: Switching to viewmode: Normal

    This should be a 16:9 PAL stream (it's ARD), and now a 4:3 stream:

    2008-12-07 12:56:48.843750 [Debug][VMRenderer]: PlaneScene: crop T, B : 0, 0
    2008-12-07 12:56:48.843750 [Debug][VMRenderer]: PlaneScene: crop L, R : 0, 0
    2008-12-07 12:56:48.843750 [Info.][VMRenderer]: PlaneScene: video WxH : 720x576
    2008-12-07 12:56:48.843750 [Debug][VMRenderer]: PlaneScene: video AR : 1024:576
    2008-12-07 12:56:48.859375 [Info.][VMRenderer]: PlaneScene: screen WxH : 1280x720
    2008-12-07 12:56:48.859375 [Debug][VMRenderer]: PlaneScene: AR type : Normal
    2008-12-07 12:56:48.859375 [Debug][VMRenderer]: PlaneScene: PixelRatio : 1
    2008-12-07 12:56:48.859375 [Debug][VMRenderer]: PlaneScene: src : (0,0)-(720,576)
    2008-12-07 12:56:48.859375 [Debug][VMRenderer]: PlaneScene: dst : (0,0)-(1280,720)
    2008-12-07 12:56:58.546875 [Info.][ViewModeSwitcherThread]: Processing the fallback rule!
    2008-12-07 12:56:58.546875 [Info.][ViewModeSwitcherThread]: Using overscan: 0
    2008-12-07 12:56:58.546875 [Info.][ViewModeSwitcherThread]: PlaneScene: Crop: top:0, bottom:0, left:0, right:0
    2008-12-07 12:56:58.546875 [Info.][ViewModeSwitcherThread]: Switching to viewmode: Normal
    2008-12-07 12:56:58.546875 [Debug][ViewModeSwitcherThread]: WindowManager: route

    I Do not see any difference! :confused:

    My ruleset looks like the attached image.

    Thanks for any help!

    Baldur
     

    Attachments

    • rules.png
      rules.png
      4.8 KB

    lkuech

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

    Which codec are you using?

    It looks a bit like you are using a codec which is not aware of aspect ratio changes, because even the 4:3 content is detected as 1024:576 which is 16:9

    Cu
    Lars
     

    baldur

    MP Donator
  • Premium Supporter
  • March 30, 2008
    33
    1
    Home Country
    Germany Germany
    Thanks for your reply - I used ffdshow when I created these logs. In the meantime I know that this codec cannot be used...I switched to Cyberlink, now the log file seems to be alright but nevertheless always the fallback rule is applied.

    Currently I have no access to my MP PC, but I can post the new logs shortly.
     

    Swede

    Portal Pro
    September 6, 2006
    493
    47
    West Coast Archipelago
    Home Country
    Sweden Sweden
    Great plugin! Not sure if this is a bug, but it works the first time I start a movie and not the second, it might be a bug. Anyway, check the log for the first time I start Heroes. First a fallback, then it finds that 16:9 is correct. The second time it's only a fallback. AND even if it says "Switching to viewmode: Normal" it doesn't.

    Only way I found to make it work again with avi files is to reinstall ffdshow and the it only works once again.

    TV and recordings works fine

    All use ffdshow.

    Edit: This is an XP pc. I did the same test on another pc with vista and there it worked. Attached vista log. Same version ffdshow.

    Edit again: Got it to work if I unchecked fallback. Fallback didn't always work in Vista either. Without fallback, everything works perfectly for me :)

    Trimmed log (first time OK, second not): Whole log attached.
    08-12-10 19:14:30.390625 [Info.][MPMain]: g_Player.OnStarted() C:\files\Heroes.S03E11.HDTV.XviD-LOL.avi media:Video
    2008-12-10 19:14:30.531250 [Info.][MPMain]: g_Player: ShowFullScreenWindow switching to fullscreen video
    2008-12-10 19:14:30.531250 [Info.][ViewModeSwitcherThread]: Processing the fallback rule!2008-12-10 19:14:30.531250 [Info.][ViewModeSwitcherThread]: Using overscan: 0
    2008-12-10 19:14:30.531250 [Info.][ViewModeSwitcherThread]: PlaneScene: Crop: top:0, bottom:0, left:0, right:0
    2008-12-10 19:14:30.562500 [Info.][ViewModeSwitcherThread]: Switching to viewmode: Normal
    2008-12-10 19:14:30.578125 [Debug][ViewModeSwitcherThread]: WindowManager: route MediaPortal.GUI.Video.GUIVideoFiles:6->MediaPortal.Dialogs.GUIDialogNotify:2016
    2008-12-10 19:14:31.062500 [Info.][VMRenderer]: PlaneScene: video WxH : 624x352
    2008-12-10 19:14:31.062500 [Debug][VMRenderer]: PlaneScene: video AR : 39:22
    2008-12-10 19:14:31.062500 [Info.][VMRenderer]: PlaneScene: screen WxH : 1280x1024
    2008-12-10 19:14:31.062500 [Debug][VMRenderer]: PlaneScene: AR type : Original
    2008-12-10 19:14:31.875000 [Debug][ViewModeSwitcherThread]: DialogWindow: MediaPortal.Dialogs.GUIDialogNotify init
    2008-12-10 19:14:33.093750 [Info.][ViewModeSwitcherThread]: Rule "16:9" fits conditions.
    2008-12-10 19:14:33.093750 [Info.][ViewModeSwitcherThread]: Switching to viewmode: Zoom14to9
    2008-12-10 19:14:33.312500 [Info.][VMRenderer]: PlaneScene: video WxH : 624x352
    2008-12-10 19:14:33.312500 [Debug][VMRenderer]: PlaneScene: video AR : 39:22
    2008-12-10 19:14:33.312500 [Info.][VMRenderer]: PlaneScene: screen WxH : 1280x1024
    2008-12-10 19:14:33.312500 [Debug][VMRenderer]: PlaneScene: AR type : Zoom14to9


    2008-12-10 19:15:32.656250 [Info.][MPMain]: g_Player.OnStarted() C:\files\Heroes.S03E11.HDTV.XviD-LOL.avi media:Video
    2008-12-10 19:15:32.828125 [Info.][MPMain]: g_Player: ShowFullScreenWindow switching to fullscreen video
    2008-12-10 19:15:32.828125 [Info.][ViewModeSwitcherThread]: Processing the fallback rule!
    2008-12-10 19:15:32.828125 [Info.][ViewModeSwitcherThread]: Using overscan: 0
    2008-12-10 19:15:32.828125 [Info.][ViewModeSwitcherThread]: PlaneScene: Crop: top:0, bottom:0, left:0, right:0
    2008-12-10 19:15:32.828125 [Info.][ViewModeSwitcherThread]: Switching to viewmode: Normal
    2008-12-10 19:15:32.828125 [Debug][ViewModeSwitcherThread]: WindowManager: route MediaPortal.GUI.Video.GUIVideoFiles:6->MediaPortal.Dialogs.GUIDialogNotify:2016
    2008-12-10 19:15:33.156250 [Info.][VMRenderer]: PlaneScene: video WxH : 624x352
    2008-12-10 19:15:33.156250 [Debug][VMRenderer]: PlaneScene: video AR : 39:22
    2008-12-10 19:15:33.156250 [Info.][VMRenderer]: PlaneScene: screen WxH : 1280x1024
    2008-12-10 19:15:33.156250 [Debug][VMRenderer]: PlaneScene: AR type : Original
    2008-12-10 19:15:34.062500 [Debug][ViewModeSwitcherThread]: DialogWindow: MediaPortal.Dialogs.GUIDialogNotify init
    2008-12-10 19:15:44.453125 [Info.][MPMain]: GUIVideoFullscreen:stop
    2008-12-10 19:15:44.546875 [Info.][MPMain]: VideoPlayer:ended C:\files\Heroes.S03E11.HDTV.XviD-LOL.avi
     

    cpp2005

    Retired Team Member
  • Premium Supporter
  • November 7, 2006
    164
    127
    Hi Lars,
    sometimes a correct rule is not matched and I found the problem: g_Player.Width and g_Player.Height values are sometimes zero in Worker method of ViewModeSwitcher.cs. To fix it, I changed the line
    ProcessRules(ARCalc, g_Player.Width, g_Player.Height);
    to
    ProcessRules(ARCalc, VMR9Util.g_vmr9.VideoWidth, VMR9Util.g_vmr9.VideoHeight);

    that's because g_Player.Width and g_Player.Height are initialized sometime after they are available in VMR9Util so there is a possibility that ViewModeSwitcher will see them before that.

    btw: what about this patch? ;)
     

    Users who are viewing this thread

    Top Bottom