Zoom : adding 'no aspect ratio change' in general settings (1 Viewer)

Would you like to be able to set up the zoom modes you want to use ?


  • Total voters
    373

joboehl

Retired Team Member
  • Premium Supporter
  • July 30, 2006
    431
    4
    Home Country
    Brazil Brazil
    NLS said:
    indeed

    ALL 16:9 TV on planet Earth right now implement this feature. quote]

    Hehe, not all. Samsung and Philips TVS don't implement this here in Brazil.

    MCE does this and when comparing the 4:3 picture MCE produces with this algorythim with the one produced by the TV, it's clearly less "important" the distortion added by the later one.

    I think this discution is great, and this feature would be very welcome.

    As for TVs, here are some of the thing 16:9 TVs here in Brazil I've seen can do:

    - Phlips LCD - Progressive Distortion (like MCE) and the one called smartzom in this forum.
    - Philip LCD 30''- The idea of continually looking for black areas and zoom until find the image, also discussed in this thread.

    All the other Zoom modes are the ones supported by MP right now.

    Just my 2 cents.
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    miljbee said:
    Third point : adding an automatic black borders detection algo. This would enable to automatically get rid off them and eventually present the interresting part of the picture into the whole screen.

    Ive actually started to play around with this after being frustated with watching on a 16:9 TV programs that containt letterboxed 16:9 material with logos and text in the black areas. Im currently playing around with a heuristic which given a bitmap(ie frame of video) decides on the area that should be shown, trying to cut logos in black bars away, but keeping subtitles. Im creating it standalone for now(ie loading a bitmap from file) and i will need some help integrating it into MP. My hope is that we could have a button that when pressed performed the auto-detection only once. We could then later look for a heuristic that is efficient enough to run every few frames or similar, but right now i just want something that doesnt make a wrong guess. Its actually not simple because the black bars are not really black, so the transition from a black bar to a dark image is that not that simple to spot.

    See this General Development thread:
    https://forum.team-mediaportal.com/viewtopic.php?t=17708
     

    knutinh

    Portal Pro
    September 4, 2005
    558
    2
    Even more fancy: Detect video window and text area. For every frame copy and paste the text area into the 16:9 (or whatever) video area so that users with 16:9 screens can remove borders AND keep their text ;-)

    -k
     

    NLS

    Portal Pro
    April 26, 2006
    922
    0
    50
    Home Country
    Greece Greece
    and while we are at it, let's do an a-la-ffdshow-but-better-than-ffdshow rescaling of the image so that people with 1080p (like me ;) ) see better picture...

    ...or why not use a fast DSL connection (8Mbit minimum required) and syncronize (to the frame) the video you already have with an automaticaly found source of 1080p remastered copy of what you see

    (which won't have the black bars or the channel logo anyway)

    hmmmmmm

    ok, I'll get back to sleep :D
     

    Huge

    Portal Member
    August 8, 2006
    7
    0
    Hi, I have had some experience writing a video player and we came up with the following ideas.

    1. Output (screen) pixel aspect ratio is fixed. Set this once, and forget.

    2. Source pixel aspect ratio can be found from direct-show, or assumed from video rect (pal, ntsc etc). *may* require some overrride, but probably not.

    3. black-bar detection in the source is a topic of its own - handle it a) automatically detect, b) let user specify (per channel ?) c) ignore.

    So, once the above (constant for given hardware setup, ie, do not need to be dynamically addressable) considerations have been taken into account, the problem reduces to the problem of fitting one rectangle inside another. A simple scheme is this:
    Have 2 controls, "allowable crop" and "allowable stretch".

    It works like this: say you have 3% allowable stretch. First thing you do is expand the video rect in the "unused" direction by up to this fraction. If that is all you need to do, then you are done.
    Otherwise, look at your "allowable crop". Say this is 20%. zoom the image (1:1) until either 20% of the image has gone, or the black bars on the side are all taken up. Whatever left over is black-barred.

    This works so well because for a given user, these numbers are pretty much constant. ie.
    Person A is a video-phile and requires a 1:1 aspect ratio, and can not tollerate losing the edge of the screen = allowable crop=0%, allowable stetch=0%.
    Person B (me!) does not like to "waste" room on the telly, does not really like stretching, and can handle a bit of the image missing at the edges: allowable stretch=2%, allowable crop=10%.
    etc.

    You do not really need to change these dynamically, so you could use the spot in the video menu to correct for source-black-bar detection/lack of. These are more subtle, and if you consider the allowable stretch, these changes wont violate peoples aspect-ratio expectations.
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    I have made some progress on the black bar detection, here are some samples of the program working on some screenshots. In each sample(click it to enlarge!), the red lines indicate the bounding box discovered, the orange at the left indicates what was considered as image content. It seems to do pretty well, except for the completely black image, but i guess thats unavoidable and can be fixed by a fallback system to say assuming letterboxed 16:9 material. It currently only looks for horizontal black bars, but the same technique can be used to look for black edges.

     

    jawbroken

    Portal Pro
    August 13, 2005
    706
    0
    Home Country
    Afghanistan Afghanistan
    That is looking pretty good. Would you consider sharing a description of the algorithm or sharing the code you have used? How fast does it currently run?

    I think the black frame case could be handled by having an extra return type/message that indicated that the bounding box was undecidable from the given frame. This could work by random/fixed point sampling to find frames that are probably too dark to yield a good bounding box.

    I notice that it looks like you are only considering the black bars at the top and bottom. Any plans for considering bounding boxes for 4:3 material in a 16:9 frame?

    Is there a good place to get sample frames of various sizes/aspect ratios/letterboxing for testing of things like this?
     

    Users who are viewing this thread

    Top Bottom