Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying header silently fails #16

Open
melMass opened this issue Jan 23, 2018 · 10 comments
Open

Modifying header silently fails #16

melMass opened this issue Jan 23, 2018 · 10 comments

Comments

@melMass
Copy link

melMass commented Jan 23, 2018

Hi,

I'm not sure what I'm doing wrong, we received a batch of ACES EXR files made from *.ari raws.
For some reason the metadatas are wrong, the image is 2880x2160 but considerer as 1.0 pixel aspect (should be 2.0 for ana).
We wanted to batch edit those using those bindings but it fail without erroring out. Is it related to ACES Exr, or Ari metadatas ?

Here is a sample based on the examples:

import OpenEXR
f = "A024C008_170506_R0VT.0005885.exr"
ex = OpenEXR.InputFile(f)
h = ex.header()
channels = h['channels'].keys()
newchannels = dict(zip(channels, ex.channels(channels)))
h["pixelAspectRatio"] = 2.0
h["comments"] = "edited EXR ACES from ARI to match the ANAMORPHIC ASPECT RATIO while retaining full pixels."

out = OpenEXR.OutputFile("out.exr",h)
out.writePixels(newchannels)
out.close()

Any idea ?

Thanks

@melMass
Copy link
Author

melMass commented Jan 23, 2018

The code fails on OpenEXR.OutputFile() using a dummy header works so something is not working while transfering the header.

@jamesbowman
Copy link
Owner

Trying the same operations on one of the standard image works fine, so seems that something in the original exr's header is causing the problem.

Please can you show h? Or if possible attach one of the images?

>>> import OpenEXR
>>> f = "GoldenGate.exr"
>>> ex = OpenEXR.InputFile(f)
>>> h = ex.header()
>>> channels = h['channels'].keys()
>>> newchannels = dict(zip(channels, ex.channels(channels)))
>>> h["pixelAspectRatio"] = 2.0
>>> h["comments"] = "edited EXR ACES from ARI to match the ANAMORPHIC ASPECT RATIO while retaining full pixels."
>>> out = OpenEXR.OutputFile("out.exr",h)
>>> out.writePixels(newchannels)
>>> out.close()

@melMass
Copy link
Author

melMass commented Jan 23, 2018

Thanks.

Here is the full pprint of h (remove serial numbers and such):

 'compression': NO_COMPRESSION,
 'dataWindow': (0, 0) - (2879, 2159),
 'displayWindow': (0, 0) - (2879, 2159),
 'expTime': 0.005555999930948019,
 'framesPerSecond': '25000/1000 (25.000)',
 'imageCounter': 405885,
 'imageRotation': 0.0,
 'interim.camera.shutterAngle': 180.0,
 'interim.camera.wbKelvin': 5600,
 'interim.clip.cameraClipName': b'A004C008_170506_R0VT',
 'interim.clip.takeName': b'C008',
 'isoSpeed': 800.0,
 'lineOrder': INCREASING_Y,
 'originalImageFlag': 1,
 'pixelAspectRatio': 1.0,
 'recorderFirmwareVersion': b'2014.SIM2.3201',
 'recorderMake': b'Codex Digital',
 'recorderModel': b'SIM2',
 'reelName': b'A004R0VT',
 'screenWindowCenter': (0.0, 0.0),
 'screenWindowWidth': 1.0,
 'storageMediaSerialNumber': b'blablablabla',
 'timeCode': <Imath.TimeCode instance { time: 4:30:35:10, dropFrame: 0, colorFrame: 0, fieldPhase: 0, bgf0: 0, bgf1: 0, bgf2: 0,
 'timecodeRate': 25,
 'utcOffset': 0.0}

They are EXR outputs from Arri's ARC_CMD which is the official converter from *.ari to ACES Compliant EXR's

@melMass
Copy link
Author

melMass commented Jan 23, 2018

hmm I realise the main dict header is not closed (missing a last {}), is that normal

@jamesbowman
Copy link
Owner

Hard to say what's happening. That header looks fine.
You can send me a problem .exr privately - [email protected]

@melMass
Copy link
Author

melMass commented Jan 23, 2018

Thanks, I've sent it using https://fromsmash.com/ the link will last 2 days.

@melMass
Copy link
Author

melMass commented Jan 23, 2018

Did you managed to deal with the sent exr ?

@jamesbowman
Copy link
Owner

jamesbowman commented Jan 23, 2018 via email

@melMass
Copy link
Author

melMass commented Jan 24, 2018

No I did not receive the email :'(

@jamesbowman
Copy link
Owner

OK... please mail me directly at [email protected] and we'll continue there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants