Zoom : adding 'no aspect ratio change' in general settings | Page 5

Discussion in 'Improvement Suggestions' started by miljbee, August 4, 2006.

?

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

  1. Yes, because there is some zoom modes that I never use

    99.7%
  2. No thanks, I am actually using all the available zoom modes

    0.3%
  1. joboehl
    • Premium Supporter

    joboehl Retired Team Member

    Joined:
    July 30, 2006
    Messages:
    431
    Likes Received:
    4
    Ratings:
    +4 / 0
    Home Country:
    Brazil Brazil


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. ziphnor
    • Premium Supporter

    ziphnor Retired Team Member

    Joined:
    August 4, 2005
    Messages:
    755
    Likes Received:
    13
    Location:
    Copenhagen
    Ratings:
    +13 / 0
    Home Country:
    Denmark Denmark
    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
     
  4. knutinh

    knutinh Portal Pro

    Joined:
    September 4, 2005
    Messages:
    558
    Likes Received:
    2
    Ratings:
    +2 / 0
    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
     
  5. NLS

    NLS Portal Pro

    Joined:
    April 26, 2006
    Messages:
    922
    Likes Received:
    0
    Occupation:
    IT
    Ratings:
    +0 / 0
    Home Country:
    Greece Greece
    yes ok and do that on an nvidia 7950 and a 3.6 dual core
     
  6. CHli

    CHli Portal Pro

    Joined:
    July 5, 2005
    Messages:
    1,251
    Likes Received:
    14
    Occupation:
    Embedded Software Engineer
    Location:
    Switzerland
    Ratings:
    +14 / 0
    Home Country:
    Switzerland Switzerland
    :lol:
     
  7. NLS

    NLS Portal Pro

    Joined:
    April 26, 2006
    Messages:
    922
    Likes Received:
    0
    Occupation:
    IT
    Ratings:
    +0 / 0
    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
     
  8. knutinh

    knutinh Portal Pro

    Joined:
    September 4, 2005
    Messages:
    558
    Likes Received:
    2
    Ratings:
    +2 / 0
    Hehe, I get the point, I wont be putting out far-out ideas =)

    -k
     
  9. Huge

    Huge Portal Member

    Joined:
    August 8, 2006
    Messages:
    7
    Likes Received:
    0
    Ratings:
    +0 / 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.
     
  10. ziphnor
    • Premium Supporter

    ziphnor Retired Team Member

    Joined:
    August 4, 2005
    Messages:
    755
    Likes Received:
    13
    Location:
    Copenhagen
    Ratings:
    +13 / 0
    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.

    [​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG]
     
  11. jawbroken

    jawbroken Portal Pro

    Joined:
    August 13, 2005
    Messages:
    706
    Likes Received:
    0
    Ratings:
    +0 / 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?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!