ViewModeSwitcher plugin (Version 0.3) (1 Viewer)

Stor-Anders

Portal Member
August 15, 2005
36
0
Hi,

I really like the plugin and it works fine. At least for a while.. Suddenly it stops working, no error messages or anything - just no effect.

Yesterday I investigated it a little closer and it seems like this:

Works fine:
¤ Watch movies (avi's) - It works fine every time, several movies/files in a row.

Unclear function:
¤ Watch TV (TVE3) (I have no channels that need adjustment.)

Error:
¤ Watch an avi first (plugin works), then watch TV (no rules applicable) and then back to an avi (plugin doesn't work). After restarting MP it's back on track and works again (according to above).

¤ Watch TV (no rules applicable) and then an avi - Plugin doesn't work . After restarting MP it's back on track and works again (according to above).

Any tips?
 

cpp2005

Retired Team Member
  • Premium Supporter
  • November 7, 2006
    164
    127
    Hi Lars and thanks for the plugin. I added a small patch to it so in case new AR modes added to MP, the plugin can use them automatically. Here the details:

    1) Settings.cs, method StringToViewMode
    instead of "switch(strViewmode) ..." use:
    Code:
          try
          {
              return (Geometry.Type)Enum.Parse(typeof(Geometry.Type), strViewmode);
          }
          catch (ArgumentException )
          {
              return Geometry.Type.Normal;
          }

    2) ViewModeSwitcherConfig.cs, method ViewModeSwitcherConfig_Load
    instead "using (MediaPortal.Profile.Settings xmlreader = ...)" block use
    Code:
          foreach (string s in Enum.GetNames(typeof(MediaPortal.GUI.Library.Geometry.Type)))
              cmbViewMode.Items.Add(s);


    3) ViewModeSwitcherRuleDetail.cs, method ViewModeSwitcherRuleDetail_Load
    instead "using (MediaPortal.Profile.Settings xmlreader = ...)" block use
    Code:
          foreach (string s in Enum.GetNames(typeof(MediaPortal.GUI.Library.Geometry.Type)))
              cmbViewMode.Items.Add(s);


    The drawback of this patch that you are losing allowed zoom modes and just show all of them.
     

    lkuech

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

    Yep. I will upload my settings soon.

    From a look in your log file I guess you are using the ffdshow post processing to upscale the video stream.
    If you upscale it to the same size ... no matter if the source was 4:3 or 16:9 then viewmodeswitcher is "blind", because all it "sees" is always equal (in your case 1280x720). Maybe you can change your ffdshow settings to handle 4:3 content a bit different as 16:9 ... then it will work ... with the right ruleset.

    CU
    Lars
     

    patricon

    Portal Pro
    June 16, 2007
    543
    18
    Home Country
    Spain Spain
    Hi lkuech, the plugin looks nice (i've noticed it until now...) i've just downloaded but i'm a bit lost. My screen uses a resolution of 1366x768 (16:9 format) and i don't know how to start... Basically, what i want is to change 4:3 format contents into 16:9 mode but using a 'smart zoom'. I've readed about this mode (that it's also used in some TV screens) that converts the 4:3 content into 16:9 but without deforming too much the image (i think that this mode applies more stretching to the margins than in the middle of the image). Can your plugin do that? how? there is a basic guide for newbies like me?

    many thanks in advance, regards,
     

    lkuech

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

    ViewModeSwitcher does not come with any new zoom mode.
    All it does is to switch automatically to a zoom mode that want (based on properties of the video file i.e. width, height, aspect ratio & letterbox detection).
    So if you want a zoom mode that handles 4:3 content for intelligent as MP is able to it natively... then you have to use the patch from ol263 (mentioned in my first post).

    Bye
    Lars
     

    mortstar

    MP Donator
  • Premium Supporter
  • January 30, 2008
    414
    41
    Home Country
    England England
    This looks like an excellent plugin, though one I think I shouldn't need until I get a 16:9 tv screen.

    I've currently got a 4:3 TV, resolution 1024x768.

    I'm using the ffdshow video codec and all channels from the TVE3 engine are being displayed in 16:9 format, even on channels which I know are 4:3 (for example Sky Sports News).

    Aspect Ratio is displayed correctly for .avi's, in TvSeries plugin.

    I've attached a log file of a change from a 4:3 .avi file showing correctly in MPTvSeries Plugin, then change to 16:9 DVB-T signal (E4 - 16:9) to a 4:3 DVB-T signal (Sky Sports News - showing 16:9). If anybody can give me a clue as to why the aspect ratio is a constant 16:9, would be much appreciated
    :D
     

    lkuech

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

    This is weird ;)

    From the log file you have posted I can see nothing out of the ordinary.
    My guess is that the avi playback is not using ffdshow and so behaves different as the two others.

    The two channels do look both like 16:9! So I guess your problem is not on the MP side. Maybe a ffdshow setting that changes the aspect ratio of your stream to 1024 all the time?

    Here is a sample from your log for "Sky Spts News"
    Code:
    2008-02-20 00:04:41.390625 [Info.][17]: PlaneScene: video WxH  : 720x576
    2008-02-20 00:04:41.390625 [Info.][17]: PlaneScene: video AR   : 1024:576
    The video stream that mp receives is 720x576. That is a normal PAL stream. The aspect ratio let it become 1024.
    So if you are sure that this channel is normally 4:3. Then it must be ffdshow that changes the aspect ratio.

    There is also a log entry that might be worth to look at:
    Code:
    2008-02-20 00:04:40.265625 [Info.][MPMain]: added filter:ffdshow Video Decoder to graph
    2008-02-20 00:04:40.265625 [Info.][MPMain]: failed:unable to add filter:ffdshow Video Decoder to graph
    2008-02-20 00:04:40.265625 [Info.][MPMain]: failed filter:ffdshow Video Decoder not found
    2008-02-20 00:04:40.281250 [Info.][MPMain]: added filter:ffdshow Audio Decoder to graph
    2008-02-20 00:04:40.281250 [Info.][MPMain]: add filter:Default DirectSound Device to graph clock:True
    I'm not sure if this is normal when using ffdshow...


    CU
    Lars
     

    jonaskp

    Portal Pro
    October 23, 2006
    438
    15
    Home Country
    Denmark Denmark
    Hi, just found this plugin, and I can see the massive potential. I just cant get it to work right. Hope you can help.

    My setup: Widescreen TV, Analog tv-tuner where everything i tune is in aspect 4:3 (meaning black bars on the side) and then some channels are "fake 16:9" (still black on the side, and also on top/bottom).

    I only use two zoom modes: Normal and Zoom (I don't like the stretched 4:3). What I want to do is, whenever the signal is a "fake 16:9" (that means black on the top/bottom), I want to use zoom - this I got working.
    The problem is, whenever it is just normal 4:3 (meaning just the black bars on the sides, not top/bottom) I want it to use "normal" zoom-mode. But it keeps changing to "zoom".

    I am using the letterbox rule, and I think the program picks up the black bars on the sides and thinks "hey, this is letterboxed, lets zoom", not noticing whether there are bars on the top.
    From what ive read, I need to change the percentages in the lower right corner of the configuration. I should then be able to specify where in the picture the program is looking for the bars, right?
    I just can't seem to find out how I tell it to look in the top-middle and bottom-middle part.

    I hope you can help. Sorry if its already answered, I couldnt find it in the thread.
     

    lkuech

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

    If I understand you right, the video stream that MediaPortal receives has always the same properties (width, height, aspect ratio). So indeed the only function that might be interesting for you is the letterbox detection.

    The plugin does not analyse the bars on the sides (left or right). There are only 3 boxes you can define in there size. One in the screen center and one on the top and bottom each.

    So what should work is a simple rule that fits the properties of your video stream and which has enabled the letterbox detection (you already seem to have those). Further more you have to set this rule to switch to "normal".

    If everything is right, than the plugin switches to "normal" each time it receives a stream... and it starts analysing the bars on the top and bottom... if it detects those bars it will switch to "zoom". And when those bars are gone it will process the rules again and your rule should switch to "normal" again.

    Thats it ;)

    If not able to work, please post a MediaPortal.log and the export of your plugin settings. That will make it a bit easier to talk about the same thing ;)

    CU
    Lars
     

    lkuech

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

    Somehow I missed your post.

    :D

    for your patch. I will test it and build it into the next release. This should make the plugin a bit more independent which is always good.
    The "drawback" is ok with me ;)

    CU
    Lars
     

    Users who are viewing this thread

    Top Bottom