[Finished] ViewModeSwitcher for 1.4.0 (1 Viewer)

Status
Not open for further replies.

Der_Bub

MP Donator
  • Premium Supporter
  • June 17, 2008
    830
    60
    Cologne
    Germany Germany
    Country flag
    Also your BB detect level thresholds are quite low (11) - try raising them a bit and see if it works better.
    Increased to 20, 35 and 50 at last, but still no change!

    Attached logs with verbose enabled and my settings with BB enabled for 16:9 HD.
     
    Last edited:

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    • Thread starter
    • Moderator
    • #92
    It thinks there is non-black video over on the right hand side, as far as I can tell from the log:

    [2013-08-26 21:30:48,369] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: Black Bar detect
    [2013-08-26 21:30:48,650] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: FindBounds
    [2013-08-26 21:30:48,651] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: Scanning top: 384 - 896, bottom: 384 - 896, left: 216 - 503, right: 216 - 503
    [2013-08-26 21:30:48,651] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: Found top line: 1
    [2013-08-26 21:30:48,652] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: Found left line: 161
    [2013-08-26 21:30:48,653] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: Found left line: 159
    [2013-08-26 21:30:48,654] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: Found right line: 1279
    [2013-08-26 21:30:48,654] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: Found bottom line: 719
    [2013-08-26 21:30:48,654] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: SingleCrop(), Detected BB -> left: 159, right: 1, top: 1, bottom: 1, Hsym: 0,00628930817610063, Vsym: 1
    [2013-08-26 21:30:48,655] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: SingleCrop(), Symmetry check failed

    (the numbers highlighted in red are the widths/heights of the black bars)

    ...but your screen capture looks OK to me....:confused:

    Can you upload/attach a small sample recording (10-20 sec would be fine) that has the problem ?
     

    Der_Bub

    MP Donator
  • Premium Supporter
  • June 17, 2008
    830
    60
    Cologne
    Germany Germany
    Country flag
    ...
    [2013-08-26 21:30:48,654] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: SingleCrop(), Detected BB -> left: 159, right: 1, top: 1, bottom: 1, Hsym: 0,00628930817610063, Vsym: 1
    [2013-08-26 21:30:48,655] [Log ] [ViewModeSwitcher] [DEBUG] - ViewModeSwitcher: SingleCrop(), Symmetry check failed

    (the numbers highlighted in red are the widths/heights of the black bars)

    ...but your screen capture looks OK to me....:confused:

    Can you upload/attach a small sample recording (10-20 sec would be fine) that has the problem ?

    Any hints for Programm to extract/cut the file?

    Non installer / standalone prefered...
     

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    • Thread starter
    • Moderator
    • #96
    I've tried the file - after remuxing it back to a .ts file - using MP 1.5.0 and it works perfectly with LAV and MS-DTV video decoders (I don't have PDVD12 available to try at the moment) on Win 8 with Intel HD3000 GPU. The version of VMS in 1.5.0 should be identical to the latest version posted in this thread.

    All I did was modify the default settings to enable continuous BB detect for all the HD rules - my settings attached. Also the manual aspect ratio/view mode selection in MP works OK with the file.

    Have you tried it with a different video decoder e.g. LAV ?
     

    Attachments

    Pat Clark

    Portal Pro
    April 25, 2012
    264
    34
    Wisconsin
    United States of America United States of America
    After some testing, it appears to me that black bar detection only is occurring at the sides of the frame, not at the top and bottom. To test this, I disabled all the rules and allowed BB detection only to run. Fully black tops and bottoms were not detected, but the sides were stripped off. I raised the detection levels to 255, 255 and still no effect at the top and bottom.

    But even if it worked as I expected, the plugin would not handle all my situations. The problem ones all have a 16:9 image in a SD 4:3 area on a 16:9 screen at an SD data rate, but also have a small channel logo in the bottom black bar area. If black bar detection and elimination was a possible rule result, then a rule would be writable, I think, which would cut off that logo. Currently, no standard rule will correctly find this situation, and BB detection leaves the top and bottom alone.
     

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    • Thread starter
    • Moderator
    • #98
    After some testing, it appears to me that black bar detection only is occurring at the sides of the frame, not at the top and bottom. To test this, I disabled all the rules and allowed BB detection only to run. Fully black tops and bottoms were not detected, but the sides were stripped off. I raised the detection levels to 255, 255 and still no effect at the top and bottom.

    But even if it worked as I expected, the plugin would not handle all my situations. The problem ones all have a 16:9 image in a SD 4:3 area on a 16:9 screen at an SD data rate, but also have a small channel logo in the bottom black bar area. If black bar detection and elimination was a possible rule result, then a rule would be writable, I think, which would cut off that logo. Currently, no standard rule will correctly find this situation, and BB detection leaves the top and bottom alone.

    Please enable 'verbose logging' (and set MP log level to 'debug) and attach the MediaPortal.log
     
    Last edited:

    Pat Clark

    Portal Pro
    April 25, 2012
    264
    34
    Wisconsin
    United States of America United States of America
    After some testing, it appears to me that black bar detection only is occurring at the sides of the frame, not at the top and bottom. To test this, I disabled all the rules and allowed BB detection only to run. Fully black tops and bottoms were not detected, but the sides were stripped off. I raised the detection levels to 255, 255 and still no effect at the top and bottom.

    But even if it worked as I expected, the plugin would not handle all my situations. The problem ones all have a 16:9 image in a SD 4:3 area on a 16:9 screen at an SD data rate, but also have a small channel logo in the bottom black bar area. If black bar detection and elimination was a possible rule result, then a rule would be writable, I think, which would cut off that logo. Currently, no standard rule will correctly find this situation, and BB detection leaves the top and bottom alone.
    Please enable 'verbose logging' (and set MP log level to 'debug) and attach the MediaPortal.log
    Here is log and xml. I took a look at the log and it now appears the problem is that rules are not really disabled. The channel in question is Science Channel, tuned twice. First tuning (to that channel) has the logo in the bottom black bar. Second tuning seemed fully black. (Other channels were tuned to see if I could find other cases, but only duplicates.)

    I do have screen shots if they would be helpful, but hesitate to upload because of my slow internet.

    [Can't seem to upload .zip file for some reason. I get an error flashing up and disappearing before I could read it. Black and red and "error" is all I could see.]

    [So, it looks like the disable check box is not working -- first rule is executed and applied: NonLinearStretch. I presume that bypasses black bar logic.]

    Here is an excerpt from the log.

    [2013-08-29 12:12:53,888] [Log ] [MPMain ] [INFO ] - TVHome.ViewChannelAndCheck(): View channel=Science Channel
    [2013-08-29 12:12:53,908] [Log ] [MPMain ] [DEBUG] - TvHome.RenderBlackImage()
    [2013-08-29 12:12:53,911] [Log ] [25 ] [DEBUG] - TvHome.OnVideoReceived() 0
    [2013-08-29 12:12:53,914] [Log ] [25 ] [DEBUG] - RenderBlack: x:130, y:890, w:257, h:144
    [2013-08-29 12:12:53,915] [Log ] [MPMain ] [INFO ] - TSReaderPlayer:pause graph
    [2013-08-29 12:12:53,926] [Log ] [MPMain ] [INFO ] - TSReaderPlayer: OnZapping :128
    [2013-08-29 12:12:54,305] [Log ] [MPMain ] [INFO ] - TSReaderPlayer: OnZapping :4
    [2013-08-29 12:12:54,305] [Log ] [MPMain ] [INFO ] - succeeded:confused:ucceeded TvControl.VirtualCard
    [2013-08-29 12:12:54,307] [Log ] [MPMain ] [INFO ] - tvhome:confused:eektoEnd(37.439375/38.997),True,rtsp=False
    [2013-08-29 12:12:54,308] [Log ] [MPMain ] [DEBUG] - g_Player.SeekAbsolute() - Preparing to seek to 0:0:38
    [2013-08-29 12:12:54,314] [Log ] [MPMain ] [INFO ] - TsReaderPlayer:seekabs:389970000 start:0 end:389970000
    [2013-08-29 12:12:54,325] [Log ] [MPMain ] [INFO ] - TsReaderPlayer: pos: 389970000 start:0 end:389970000
    [2013-08-29 12:12:54,325] [Log ] [MPMain ] [INFO ] - TsReaderPlayer seek done:0
    [2013-08-29 12:12:54,325] [Log ] [MPMain ] [INFO ] - TSReaderPlayer: current pos:38.997 dur:38.997
    [2013-08-29 12:12:54,326] [Log ] [MPMain ] [INFO ] - TSReaderPlayer:Continue graph
    [2013-08-29 12:12:54,335] [Log ] [MPMain ] [DEBUG] - g_Player: ShowFullScreenWindow
    [2013-08-29 12:12:54,337] [Log ] [MPMain ] [INFO ] - TVHome: ShowFullScreenWindow switching to fullscreen tv
    [2013-08-29 12:12:54,461] [Log ] [MPMain ] [DEBUG] - Window: TvPlugin.TvFullScreen init
    [2013-08-29 12:12:54,461] [Log ] [MPMain ] [DEBUG] - TvFullScreen:init->OSD:Off
    [2013-08-29 12:12:54,465] [Log ] [MPMain ] [DEBUG] - TvFullScreen: init, playing True, player.CurrentFile E:\TimeShift\live2-0.ts.tsbuffer, TVHome.Card.TimeShiftFileName E:\TimeShift\live2-0.ts.tsbuffer
    [2013-08-29 12:12:54,489] [Log ] [MPMain ] [INFO ] - TSReaderPlayer:OnRequestAudioChange()
    [2013-08-29 12:12:54,489] [Log ] [MPMain ] [DEBUG] - TVHome.OnAudioTracksReady()
    [2013-08-29 12:12:54,491] [Log ] [MPMain ] [DEBUG] - TVHome.GetPreferedAudioStreamIndex(): preferred LANG(s):n/a preferAC3:True _preferAudioTypeOverLang:True
    [2013-08-29 12:12:54,491] [Log ] [MPMain ] [DEBUG] - Audio streams avail: 2
    [2013-08-29 12:12:54,491] [Log ] [MPMain ] [INFO ] - TsReaderPlayer: AudioDualMonoMode switching not available. Audioswitcher filter not loaded
    [2013-08-29 12:12:54,491] [Log ] [MPMain ] [INFO ] - Audio stream: switching to preferred AC3 audio stream 0, NOT based on LANG
    [2013-08-29 12:12:54,491] [Log ] [MPMain ] [INFO ] - TsReaderPlayer: AudioDualMonoMode switching not available. Audioswitcher filter not loaded
    [2013-08-29 12:12:54,979] [Log ] [25 ] [DEBUG] - TvHome.OnVideoReceived() 3
    [2013-08-29 12:12:54,979] [Log ] [25 ] [DEBUG] - ViewModeSwitcher: OnVideoReceived() AR:1.333333, LastAR:0
    [2013-08-29 12:12:54,979] [Log ] [25 ] [INFO ] - ViewModeSwitcher: Rule "4:3" fits conditions.
    [2013-08-29 12:12:54,979] [Log ] [25 ] [INFO ] - PlaneScene: Crop: top:5, bottom:5, left:8, right:8
    [2013-08-29 12:12:54,979] [Log ] [25 ] [INFO ] - ViewModeSwitcher: Switching to viewmode: NonLinearStretch
    [2013-08-29 12:12:54,979] [Log ] [25 ] [DEBUG] - PlaneScene: crop T, B : 5, 5
    [2013-08-29 12:12:54,979] [Log ] [25 ] [DEBUG] - PlaneScene: crop L, R : 8, 8
    [2013-08-29 12:12:54,979] [Log ] [25 ] [INFO ] - PlaneScene: video WxH : 528x480
    [2013-08-29 12:12:54,979] [Log ] [25 ] [DEBUG] - PlaneScene: video AR : 4:3
    [2013-08-29 12:12:54,979] [Log ] [25 ] [INFO ] - PlaneScene: screen WxH : 1920x1080
    [2013-08-29 12:12:54,979] [Log ] [25 ] [DEBUG] - PlaneScene: AR type : NonLinearStretch
    [2013-08-29 12:12:54,979] [Log ] [25 ] [DEBUG] - PlaneScene: PixelRatio : 1
    [2013-08-29 12:12:54,979] [Log ] [25 ] [DEBUG] - PlaneScene: src : (8,24)-(520,454)
    [2013-08-29 12:12:54,979] [Log ] [25 ] [DEBUG] - PlaneScene: dst : (0,0)-(1920,1080)
    [2013-08-29 12:12:54,980] [Log ] [25 ] [DEBUG] - RenderBlack: x:0, y:0, w:1920, h:1080
    [2013-08-29 12:12:55,480] [Log ] [25 ] [DEBUG] - TvHome.OnVideoReceived() 2
    [2013-08-29 12:12:55,480] [Log ] [25 ] [DEBUG] - RenderBlack: x:0, y:0, w:1920, h:1080
    [2013-08-29 12:12:55,613] [Log ] [25 ] [DEBUG] - TvHome.OnVideoReceived() 1
    [2013-08-29 12:12:55,613] [Log ] [25 ] [DEBUG] - TvHome.StopRenderBlackImage()

    Directory has ONLY viewmodeswitcher2.xml. Here it is.

    <?xml version="1.0" encoding="utf-8"?>
    <profile>
    <section name="ViewModeSwitcher">
    <entry name="parmdisableLBglobaly">no</entry>
    <entry name="parmverboselog">yes</entry>
    <entry name="parmshowswitchmsg">no</entry>
    <entry name="parmusefallbackrule">no</entry>
    <entry name="parmdisableforvideo">no</entry>
    <entry name="parmdisableLBforvideo">no</entry>
    <entry name="parmfallbackviewmode">Normal</entry>
    <entry name="parmrulecount">9</entry>
    <entry name="parmblacklevel">255</entry>
    <entry name="parmfallbackoverscan">0</entry>
    <entry name="parmminblacklevel">255</entry>
    <entry name="parmsymlimitpercent">10</entry>
    <entry name="parmLBdetectinterval">4</entry>
    <entry name="parmmaxcroplimitpercent">12</entry>
    <entry name="parmdetectwidthpercent">40</entry>
    <entry name="parmdetectheightpercent">40</entry>
    <entry name="parmrule1Enabled">no</entry>
    <entry name="parmrule1Name">4:3 SD</entry>
    <entry name="parmrule1ARFromX1000">1200</entry>
    <entry name="parmrule1ARToX1000">1460</entry>
    <entry name="parmrule1MinWidth">200</entry>
    <entry name="parmrule1MaxWidth">799</entry>
    <entry name="parmrule1MinHeight">200</entry>
    <entry name="parmrule1MaxHeight">599</entry>
    <entry name="parmrule1ViewMode">NonLinearStretch</entry>
    <entry name="parmrule1Overscan">0</entry>
    <entry name="parmrule1EnableLBDetection">yes</entry>
    <entry name="parmrule1AutoCrop">yes</entry>
    <entry name="parmrule1MaxCrop">yes</entry>
    <entry name="parmrule2Enabled">no</entry>
    <entry name="parmrule2Name">4:3 HD</entry>
    <entry name="parmrule2ARFromX1000">1200</entry>
    <entry name="parmrule2ARToX1000">1460</entry>
    <entry name="parmrule2MinWidth">800</entry>
    <entry name="parmrule2MaxWidth">2000</entry>
    <entry name="parmrule2MinHeight">600</entry>
    <entry name="parmrule2MaxHeight">2000</entry>
    <entry name="parmrule2ViewMode">NonLinearStretch</entry>
    <entry name="parmrule2Overscan">0</entry>
    <entry name="parmrule2EnableLBDetection">yes</entry>
    <entry name="parmrule2AutoCrop">yes</entry>
    <entry name="parmrule2MaxCrop">yes</entry>
    <entry name="parmrule3Enabled">no</entry>
    <entry name="parmrule3Name">16:9 SD</entry>
    <entry name="parmrule3ARFromX1000">1700</entry>
    <entry name="parmrule3ARToX1000">1900</entry>
    <entry name="parmrule3MinWidth">200</entry>
    <entry name="parmrule3MaxWidth">799</entry>
    <entry name="parmrule3MinHeight">200</entry>
    <entry name="parmrule3MaxHeight">599</entry>
    <entry name="parmrule3ViewMode">Normal</entry>
    <entry name="parmrule3Overscan">0</entry>
    <entry name="parmrule3EnableLBDetection">yes</entry>
    <entry name="parmrule3AutoCrop">yes</entry>
    <entry name="parmrule3MaxCrop">yes</entry>
    <entry name="parmrule4Enabled">no</entry>
    <entry name="parmrule4Name">16:9 HD</entry>
    <entry name="parmrule4ARFromX1000">1700</entry>
    <entry name="parmrule4ARToX1000">1900</entry>
    <entry name="parmrule4MinWidth">800</entry>
    <entry name="parmrule4MaxWidth">2000</entry>
    <entry name="parmrule4MinHeight">600</entry>
    <entry name="parmrule4MaxHeight">2000</entry>
    <entry name="parmrule4ViewMode">Normal</entry>
    <entry name="parmrule4Overscan">0</entry>
    <entry name="parmrule4EnableLBDetection">yes</entry>
    <entry name="parmrule4AutoCrop">yes</entry>
    <entry name="parmrule4MaxCrop">yes</entry>
    <entry name="parmrule5Enabled">no</entry>
    <entry name="parmrule5Name">21:9 SD</entry>
    <entry name="parmrule5ARFromX1000">2200</entry>
    <entry name="parmrule5ARToX1000">2450</entry>
    <entry name="parmrule5MinWidth">200</entry>
    <entry name="parmrule5MaxWidth">799</entry>
    <entry name="parmrule5MinHeight">200</entry>
    <entry name="parmrule5MaxHeight">599</entry>
    <entry name="parmrule5ViewMode">Zoom14to9</entry>
    <entry name="parmrule5Overscan">0</entry>
    <entry name="parmrule5EnableLBDetection">yes</entry>
    <entry name="parmrule5AutoCrop">yes</entry>
    <entry name="parmrule5MaxCrop">yes</entry>
    <entry name="parmrule6Enabled">no</entry>
    <entry name="parmrule6Name">21:9 HD</entry>
    <entry name="parmrule6ARFromX1000">2200</entry>
    <entry name="parmrule6ARToX1000">2450</entry>
    <entry name="parmrule6MinWidth">800</entry>
    <entry name="parmrule6MaxWidth">2000</entry>
    <entry name="parmrule6MinHeight">600</entry>
    <entry name="parmrule6MaxHeight">2000</entry>
    <entry name="parmrule6ViewMode">Normal</entry>
    <entry name="parmrule6Overscan">0</entry>
    <entry name="parmrule6EnableLBDetection">yes</entry>
    <entry name="parmrule6AutoCrop">yes</entry>
    <entry name="parmrule6MaxCrop">yes</entry>
    <entry name="parmrule7Enabled">no</entry>
    <entry name="parmrule7Name">4:3 inside 16:9</entry>
    <entry name="parmrule7ARFromX1000">-1200</entry>
    <entry name="parmrule7ARToX1000">-1460</entry>
    <entry name="parmrule7MinWidth">200</entry>
    <entry name="parmrule7MaxWidth">2000</entry>
    <entry name="parmrule7MinHeight">200</entry>
    <entry name="parmrule7MaxHeight">2000</entry>
    <entry name="parmrule7ViewMode">Zoom</entry>
    <entry name="parmrule7Overscan">0</entry>
    <entry name="parmrule7EnableLBDetection">yes</entry>
    <entry name="parmrule7AutoCrop">yes</entry>
    <entry name="parmrule7MaxCrop">yes</entry>
    <entry name="parmrule8Enabled">no</entry>
    <entry name="parmrule8Name">16:9 inside 4:3</entry>
    <entry name="parmrule8ARFromX1000">-1470</entry>
    <entry name="parmrule8ARToX1000">-1950</entry>
    <entry name="parmrule8MinWidth">200</entry>
    <entry name="parmrule8MaxWidth">2000</entry>
    <entry name="parmrule8MinHeight">200</entry>
    <entry name="parmrule8MaxHeight">2000</entry>
    <entry name="parmrule8ViewMode">Zoom</entry>
    <entry name="parmrule8Overscan">0</entry>
    <entry name="parmrule8EnableLBDetection">yes</entry>
    <entry name="parmrule8AutoCrop">yes</entry>
    <entry name="parmrule8MaxCrop">yes</entry>
    <entry name="parmrule9Enabled">no</entry>
    <entry name="parmrule9Name">21:9 inside 16:9</entry>
    <entry name="parmrule9ARFromX1000">-2100</entry>
    <entry name="parmrule9ARToX1000">-2570</entry>
    <entry name="parmrule9MinWidth">200</entry>
    <entry name="parmrule9MaxWidth">2000</entry>
    <entry name="parmrule9MinHeight">200</entry>
    <entry name="parmrule9MaxHeight">2000</entry>
    <entry name="parmrule9ViewMode">Zoom</entry>
    <entry name="parmrule9Overscan">0</entry>
    <entry name="parmrule9EnableLBDetection">yes</entry>
    <entry name="parmrule9AutoCrop">yes</entry>
    <entry name="parmrule9MaxCrop">yes</entry>
    </section>
    </profile>
     
    Last edited:

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    I really need the full log with the 'verbose' option enabled in ViewModeSwitcher advanced settings.

    You must have a rule which enables BB detection - it defaults to 'disabled' otherwise. You can make an 'accept anything' rule if you need to - just set the min and max values for AR and H/V sizes to cover all possible values, and enable continuous BB detection in it (and view mode to 'Normal' i.e. do nothing).
     
    Status
    Not open for further replies.

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom