| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Developer Join Date: Feb 2007 Location: Hamburg Age: 34
Posts: 513
Thanks: 26
Thanked 41 Times in 15 Posts
Country: | Hi all. Users of the "old" TV engine should read the hint about the rule configuration! Short description: The idea of ViewModeSwitcher was to help MediaPortal (connected to a wide screen) to handle all kind of signals (4:3, fake 16:9 (letterbox) and 16:9) without change the zoom mode via remote all the time. Longer description: First I want to send big thanks to the development team of MediaPortal and of course to everyone else who helps to improve this project every day. A special thanks goes to ziphnor, the author of the autocropper plugin. ViewModeSwitcher is based on his idea of implementation. I am currently in the planning phase of a HTPC came to the conclusion, that MediaPortal is the most flexible and interesting way to go. I developed the ViewModeSwitcher plugin to create a higher WAF (Woman Acceptance Factor), because my flat screen as an Option to predefine a zoom mode for 4:3 broadcasts. That means that you can choose which zoom mode (14:9, Smartzoom, wide or just plain 4:3) is used per default if a 4:3 signal is detected. My wife (and my self as well) loved this function because we don’t like to watch television with black bars on the left and right side. Of course the flat screen itself does not see any changes from 4:3 to 16:9 if it is connected to a HTPC... So I have to build this functionality inside of MediaPortal. MediaPortal currently lacks a zoom mode that is a compromise between stretch and zoom, but there is a patch that helps a lot here: Implemented Non-Linear (Smart) Stretching of 4:3->16:9 Maybe someone else will find this plugin useful as well. ViewModeSwitcher offers:
The detection of aspect ratio changes requires a codec that supports it (i.e. DScaler, PureVideo, Cyberlink PowerDVD). The behaviour of ViewModeSwitcher is based on a ruleset, that can be defined in the configuration. ![]() The configuration for my “4:3 PAL” rule that switches automatically to “Stretch” for example looks like this: (notice the new letterbox option!) ![]() If you are not sure which values you have to use, you can look in the MediaPortal.log. If the logging is set at “Information” level, you should find something like this (after the playback as started). [Info.][5]: PlaneScene: video WxH : 768x576 [Info.][5]: PlaneScene: video AR : 768:576 The Aspect Ratio is calculated by using the AR values and divide the width through the height. 768/576 = 1.3333333333333333333333333333333 This is how a normal PAL 4:3 broadcast should look like. A 16:9 PAL broadcast may look like this: PlaneScene: video WxH : 1024x576 PlaneScene: video AR : 1024:576 1024/576 = 1.7777777777777777777777777777778 Attention! With RC2 of MediaPortal these values are now a bit different! Now they are 4:3 or 16:9. But under the line these values lead to the same results... 4/3 = 1.3333333333333333333333333333333 and 16/9 = 1.7777777777777777777777777777778... This is how my 16:9 PAL rule looks like: ![]() These two rules together are doing a decent job for me. But leave HDTV untouched. Users of the old TV engine have to do some changes to the rule mentioned above. If you switch MediaPortal into the "Debug" log mode, you will see something like: [Debug][ViewModeSwitcherThread]: VideoAspectRatioX 768 [Debug][ViewModeSwitcherThread]: VideoAspectRatioY 576 [Debug][ViewModeSwitcherThread]: VideoWidth 0 [Debug][ViewModeSwitcherThread]: VideoHeight 0 That means that the old TV engine does not provide the values of width and height the same way like the normal media player does (the one that the new engine uses). Because of this you have to change your rules to tolerate this by settings the values of min and max width and height to 0. You still need the original rules if the plugin should help you under myVideo. Letterbox detection Letterbox detection requires analysing of the content of a broadcast. With other words... the plug grapps a frame from the stream and analyses if it contains black bars in the upper and/or lower part. Of course this is a process which requires processing power (CPU) and should only be activated if your system has enough idle time left during the playback of TV streams. If you have designed a rule with enabled letterbox detection (normally a 4:3 rule) you can configure the following options. ![]()
This version is tested under MyVideo and the MyTVPlugin (TV engine 0.3) with the lastest SVN. It is also tested width the old TV engine. Read the hint above! New in version 0.3:
Known problems:
The plugin can be found in the plugin repository. Currently as version 0.3. Here is the link: MEDIAPORTAL - free MediaCenter HTPC Software - ViewModeSwitcher 0.3 I hope you like it. Bye Lars Last edited by lkuech; 2008-08-15 at 09:56. Reason: New version |
| | |
| | #2 (permalink) |
| Portal Developer Join Date: Jan 2005 Age: 30
Posts: 2,597
Thanks: 68
Thanked 66 Times in 55 Posts
| Looks interesting. Have you check the auto cropper functionality? Maybe these two could be merged together?
__________________ http://day2.no-ip.org/ "Commy64 - The problem there is that Oprah was on. MP tried to save you by blanking the screen" |
| | |
| | #3 (permalink) |
| Portal Developer Join Date: Feb 2007 Location: Hamburg Age: 34
Posts: 513
Thanks: 26
Thanked 41 Times in 15 Posts
Country: | Hi tourettes. yes I know the auto cropper. It was the plugin that had "inspired" me to build the ViewModeSwitcher. Of course, merging this two plugins is possible. But these plugins are developed with different "goals". Auto cropper main task is to zoom as best as possible into the picture without loosing subtitles. And ViewModeSwitcher adds mainly the possibility to have a default zoom mode for every kind of signal. (You can still choose the zoom mode yourself by using the s key) Here in Germany we have normally 4 kinds of signals.
The idea of ViewModeSwitcher was to help MediaPortal (connected to a wide screen) handle all these kind of signals without change the zoom mode via remote all the time. Letterbox is the only signal type where the plugin can't help so far. Those signals are best viewed in the mode "zoom", but you have to switch to it via remote. An automatically detection of letterbox signals is already included in the auto cropper, but unfortunately it seems to leave the bottom black bar visible pretty often and generates small black borders around the whole picture frequently. So we have two options. Merge these two plugins and make auto cropper also useful for the "German" letterbox broadcasts, or let these plugins coexist ... but I guess sooner or later I will have to implement a letterbox detection function that simply switches to the already implemented "zoom" mode... that is pretty near to what auto cropper is trying to do, but still with a little bit different focus. Did you test the plugin? I would like to have some feedback before I make it "more" public by uploading it on the main site. CU Lars |
| | |
| | #7 (permalink) |
| Portal Developer Join Date: Feb 2007 Location: Hamburg Age: 34
Posts: 513
Thanks: 26
Thanked 41 Times in 15 Posts
Country: | @Stone: really 120 x 768? Or 1280 x 768...? Under the line it makes no different, all you have to do is change the parameters a little bit. So in case the video is really 120 x 768 and you what MediaPortal automatically switch to "Stretch" if a playback of such a video is started, just create a rule with the following parameters:
CU Lars |
| | |
![]() |
| Bookmarks |
| Tags |
| plugin, version, viewmodeswitcher |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ein neues Plugin von einem bestehenden Plugin programmiertechnisch ableiten? | bartmanson | Plugins/Erweiterungen | 10 | 2008-05-19 23:07 |
| MCE Plugin Plugin | sambuddy | Plugins | 1 | 2006-06-23 08:00 |
| memory plugin-newbie plugin dev. questions | newbie23 | Plugins | 13 | 2005-09-08 20:19 |
| plugin : GetHome / my plugin ? | Boris | General Development (no feature request here!) | 0 | 2005-08-07 12:28 |
| Plugin Request - Cinema Preview Plugin | Schrauber | Plugins | 0 | 2004-08-17 15:34 |