ggarra13 / mrv2

Professional player and review tool for vfx, animation and computer graphics.
https://mrv2.sourceforge.io
BSD 3-Clause "New" or "Revised" License
236 stars 15 forks source link

Automated OCIO settings #299

Closed lukas-remis closed 2 months ago

lukas-remis commented 2 months ago

Hi,

I'm trying to pass Input color space and OCIO Display/View settings to mrv2 with ENV variables from Nuke, but it doesn't seem to work. It seems I'm able to pass the the OCIO Display/View with OCIO_ACTIVE_DISPLAYS and OCIO_ACTIVE_VIEWS, but still the OCIO Display/View is set to None (although the correct option is on the list and it needs to be selected manually).

Also, is there a ENV variable that would control the Input Color Space setting?

ggarra13 commented 2 months ago

There used to be but I took it out in a recent version. However, you can use the command-line for it, with:

mrv2 -ics "<ICS>" -od "<Display>" [-ov "<View>"]

[ what is in brackets is optional]

You can also set the values in the UI in Window->Preferences->OCIO Defaults.

If you really need an environment variable, let me know exactly how Nuke handles it and I'll add it for the next version.

lukas-remis commented 2 months ago

Ohh, nice. Let me try the command line parameters then. It doesn't have to be ENV variables. Can the OCIO config also be passed using command line ?

ggarra13 commented 2 months ago

Currently not. But you can use the OCIO environment variable for it.

lukas-remis commented 2 months ago

So an example command should be: mrv2 -ics "linear" -od "rec709" ? Cause I'm getting an error: ERROR: [app] Filename '-ics linear -od rec709; does not exist or does not have read permissions.

Also, is seems that the new mrv2 version (v1.2.6) has an error, and the OCIO Display/View list can't be changed to anything else than "None". It was working fine in v1.2.5. I'm on Ubuntu 20.04

ggarra13 commented 2 months ago

It's working for me. It seems you have a quoting issue, as you are passing all '-ics linear -od rec709' as a single string.

Go to the console and with the studio config, try:

mrv2-v1.2.6 -ics 'scene_linear' -od 'sRGB - Display'

lukas-remis commented 2 months ago

Zrzut ekranu z 2024-09-09 12-42-58 Here the parameters are passed with correct quoting I think, but mrv2 still complaining about it, although it correctly loads the footage. The full command is: /usr/bin/mrv2 -ics 'scene_linear' -od 'rec709' /VFX/KQ/shots/KQ_SC013b_S001/export/KQ_SC013b_S001_comp_v004/KQ_SC013b_S001_comp_v004.1001.exr

ggarra13 commented 2 months ago

It works for me. Do this exactly (copy and paste):

export OCIO=/usr/local/mrv2-v1.2.6-Linux-64/ocio/cg-config/cg-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio
cd /VFX/KQ/shots/KQ_SC013b_S001/export/KQ_SC013b_S001_comp_v004/
/usr/bin/mrv2 -ics 'scene_linear' -od 'sRGB - Display' KQ_SC013b_S001_comp_v004.1001.exr

Also look at the output of:

ls -l /usr/bin/mrv2

lukas-remis commented 2 months ago

Alright, this works correctly from command line - thank you! However if I switch the OCIO to nuke-deault then mrv2 doesn't allow to change the OCIO Display/View setting. And I need to further investigate, cause I'm trying to launch mrv2 from Nuke, and there the same command is causing that "ERROR: [app] Filename..." error.

ggarra13 commented 2 months ago

Here's with the nuke-default:

export OCIO=/usr/local/mrv2-v1.2.6-Linux-64/ocio/nuke-default/config.ocio 
/usr/bin/mrv2 -ics 'scene_linear' -od 'default' -ov 'rec709'
ggarra13 commented 2 months ago

I think you might need to use backslashes on the quotes in Nuke to avoid getting parsed differently.

lukas-remis commented 2 months ago

Using that last command together with the nuke-default OCIO, seems to be correctly setting the ICS, but the image is displayed in sRGB for me, and on the second screenshot you can see that the "OCIO Display/View" setting is set to "None" and it doesn't allow me to switch it. I have to go to OCIO > All monitors > rec709 (I have 2 screens) - then it's correctly set to rec709. I don't have such problem when using the cg-config-v1.0.0_aces-v1.3_ocio-v2.1.ocio

Zrzut ekranu z 2024-09-09 13-44-35 Zrzut ekranu z 2024-09-09 13-44-44

lukas-remis commented 2 months ago

Hey Gonzalo! This works, thank you very much for the quick fix :)

But... ;) I think I found another bug - it seems mrv2 can't load dpx sequences. It just freezes. If you need some dpx files for testing, you can download from here: https://ds.imaginary-pixels.com:6661/sharing/94UENzWR6

ggarra13 commented 2 months ago

Those .dpx are corrupt. They have a Film Frame Rate of 0. I've added a check for it just in case in mrv2. Will have a new beta shortly.

lukas-remis commented 2 months ago

OK, that's strange. I had the same problem with original dpx plate, so this must have been passed in meta data.

ggarra13 commented 2 months ago

DPX work around at:

.deb: https://mega.nz/file/KShFBL6A#8WGKWTImwQQ-d5zO7KDJe0_ecDrIHixqOrrs_C2_DC8

.rpm: https://mega.nz/file/ybRE0CSB#i1F8llPmRZf7XWrS2eFhR2v5cwnZJDEe45RoZXdqunY

.tar.gz: https://mega.nz/file/7WZlHICZ#oWQ5sfAR8rIWp9-9SYBkVpDj7MCWv1Z3JW-H_O8FCN8

lukas-remis commented 2 months ago

Nice! This solves it. Thank you :)

btw, is there a setting in mrv2 of how much RAM should be used for buffering? I can't find anything like that.

ggarra13 commented 2 months ago

btw, is there a setting in mrv2 of how much RAM should be used for buffering? I can't find anything like that.

Panel->Settings->Cache/Gigabytes. The default is to use half your RAM, but you can set it to whatever you want.

lukas-remis commented 2 months ago

Great. I was looking in Preferences. Thanks!