INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Configuring playback to crop black bars for use with an anamorphic lens  (Read 720 times)

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3970

just revisiting zooming black bars away

Right Click during Playback, the Window menu. If I take a typical cinema movie in 2.35:1 with letterboxing (eg. 16:9 in 1920x1080 or 3840x2160):

- Crop Black Bars -> 2.35
- Crop Black Bars -> Untick "Crop Sides of Video to Fill Screen"

This should just allow the video to fill the screen if there is room without any bad cropping or scaling.
the "Crop Sides of Video to Fill Screen" option behaves v erratically

it appears that the tag saved for the above is

    "Playback Info": "(1:1)(11:AspectRatio)(36:(1:4)(1:0)(1:0)(7:1310767)(1:0)(1:0))"

if I paste this into an item and click play, it zooms the black bars away and the option is checked

if I then start playback and check that item via the UI, the zoom changes
if I uncheck it (via the ui), the zoom disappears completely and I'm back to having black bars
stop playback and start it again, it's zooming again as expected

I'd think this must be a bug
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10739
Re: Configuring playback to crop black bars for use with an a lens
« Reply #1 on: April 23, 2023, 05:14:24 pm »

I can't reproduce this, with that info copy-pasted the option starts off (its the second to last zero), and toggling it on doesn't change the image even on my ultra-wide resolution, since the sides are not being cropped anyway.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3970
Re: Configuring playback to crop black bars for use with an a lens
« Reply #2 on: April 24, 2023, 02:43:13 am »

(split to new thread)

I remembered discussing this in the past and thought I'd found the right post, is this not the right way to do it?

i.e. equivalent of madvr zoom'ing away black bars and changing the aspect ratio (for subsequent correction by an anamorphic lens)

EDIT: actually it's probably this post/thread - https://yabb.jriver.com/interact/index.php/topic,131214.msg923650.html#msg923650

just to recap from that thread


1) Set Aspect Ratio Correction in advanced options + set Window > Crop in the right click menu during playback
2) Don't see any advanced options, use the Window menu only with Stretch + Crop Black Bars > Video within Black Bars is 2.35
I think the former would require use of zones which, given that I already use zones for DSP config, is unpleasant (small combinatorial explosion in no of zones... NB: this is a longstanding problem with zones for me, they're too "big", it would be better to be able to override just some particular bit of config)

Hendrik notes in the other thread that stretch is "dumb" in that it blindly stretches as you tell it to, I suspect that this will be ok though if it's driven by black bar detection as that detection, if it detected correctly, has the brains and so stretch and just do as it is told.

and one other point I notice there

I don't think video playback settings are synced across devices, but i'm not 100% right now.
they do appear to be (confirming, if it needed to be confirmed, that this needs to be supported by jrvr profiles)
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3970
Re: Configuring playback to crop black bars for use with an a lens
« Reply #3 on: April 24, 2023, 07:37:33 am »

I can't reproduce this, with that info copy-pasted the option starts off (its the second to last zero), and toggling it on doesn't change the image even on my ultra-wide resolution, since the sides are not being cropped anyway.
I was testing with a 30.0.87 linux client (so streamed from server) with a 1080p screen, it definitely zooms with those config options

on a 31.0.2 windows client playing the file directly to a 4k screen, it does not zoom with same options

options > video > advanced has nothing set for aspect ratio correction in either case
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10739
Re: Configuring playback to crop black bars for use with an a lens
« Reply #4 on: April 24, 2023, 11:21:44 am »

Hendrik notes in the other thread that stretch is "dumb" in that it blindly stretches as you tell it to, I suspect that this will be ok though if it's driven by black bar detection as that detection, if it detected correctly, has the brains and so stretch and just do as it is told.

You should never use stretch, really, unless you very carefully selected your videos and all other settings, as its not designed to retain the proper aspect ratio.
With black bar cropping set properly, even today, preserve aspect ratio should just do the job, safely. Right now black bar cropping is just entirely manual, per video, and limited to a few presets. (well, depending on what you are after, both Preserve and Crop can be valid, depending on if you want constant width or constant height, showing all image content or never showing black bars)

If you throw in anamorphic rendering, you get other concerns of course. I don't assume you just setup a custom resolution with the right aspect ratio, but rather need actually "distorted" output in a standard resolution, so the lens can un-distort it? Which I believe is also possible today, just not very intuitive in the options.

Note that I'm likely to look at how all of these interact as I add support for automatic black bar cropping, and maybe move/duplicate some of it into JRVR profiles. I imagine the existing "aspect ratio override" option sees very little use, because its from a time when screens had non-square pixel, and the descriptions it uses still reflect that. Not many would ever get to the conclusion that it can be used for anamorphic lenses, although thats really quite the same thing as a display with non-square pixel.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3970

more spelunking through search results....

https://wiki.jriver.com/index.php/Video_Playback_Aspect_Ratio is not so helpful, probably needs some more content
https://yabb.jriver.com/interact/index.php/topic,89083.msg611804.html#msg611804 appears to be the way?

2nd param to 28022 appears to correspond to

0 & 8 = both appear to be no crop
1 = stretch
2 = crop
3-6 = preserve aspect ratio with crop black bars (1.78/1.85/2.35/2.4 respectively)

it seems that using that Options > Video > Advanced option without cropping produces black bars on the sides to go with the top, it would be interesting to know how this is processed. For example is it downscaled (to produce those black bars on the sides) and then scaled back up? could that info be added to the JRVR OSD?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3970
Re: Configuring playback to crop black bars for use with an a lens
« Reply #6 on: April 24, 2023, 02:52:43 pm »

Note that I'm likely to look at how all of these interact as I add support for automatic black bar cropping, and maybe move/duplicate some of it into JRVR profiles. I imagine the existing "aspect ratio override" option sees very little use, because its from a time when screens had non-square pixel, and the descriptions it uses still reflect that. Not many would ever get to the conclusion that it can be used for anamorphic lenses, although thats really quite the same thing as a display with non-square pixel.
yes I certainly look forward to that, all I'm trying to do atm is be able to easily replicate what madvr does automatically in order to be able to use jrvr rather than madvr day in day out as that seems to be the only way I'll be able to assess it. I think how to use with an a lens is the final thing for me to work out before I can do that (as well as run a new calibration in order to generate a 3d lut in cube format)
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10739

it seems that using that Options > Video > Advanced option without cropping produces black bars on the sides to go with the top, it would be interesting to know how this is processed. For example is it downscaled (to produce those black bars on the sides) and then scaled back up? could that info be added to the JRVR OSD?

It just shrinks the rendering target window, or constrains it for cropping, which JRVR actually tells you about (sort of, its a bit hard to read). So it does not do any double scaling, it just acts as if you were rendering into a smaller window or with a smaller resolution. The OSD definitely tells you the rendering steps, there is nothing else ever going on.

I'll check out the difference in behavior between linux and windows tomorrow.
Logged
~ nevcairiel
~ Author of LAV Filters

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10739

The aspect ratio/crop behavior should be fixed on Linux and Mac in one of the upcoming MC31 builds.
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3970

Great, thanks
Logged
Pages: [1]   Go Up