Hello, please excuse me if this is not the right place for this question:
I'm writing a simple script to change the compression and timecode metadata
of a sequence of EXRs. I was planning on using oiiotool to do so, and
although I can get timecode out of a properly formatted file (using
oiiotool --info -v file.exr for example) I cannot write the timecode
field back in a way where the tool seems to understand that it is an
integer pair.
as a sanity check, I'm using the exrheader tool that's a binary with the
EXR library. If the input file has properly formatted timecode, exrheader
will spit out the properly formatted SMPTE timecode in the form 00:00:00:00
(see below)
known file with good timecode from exrheader:
qc02:~ qc2$ exrheader test01.exr
> file test01.exr:
> file format version: 2, flags 0x0
channels (type chlist):
B, 16-bit floating-point, sampling 1 1, plinear
G, 16-bit floating-point, sampling 1 1, plinear
R, 16-bit floating-point, sampling 1 1, plinear
compression (type compression): none
dataWindow (type box2i): (0 0) - (4095 2159)
displayWindow (type box2i): (0 0) - (4095 2159)
framesPerSecond (type rational): 24/1 (24)
lineOrder (type lineOrder): increasing y
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
timeCode (type timecode):
time 10:32:53:16
drop frame 0, color frame 0, field/phase 0
bgf0 0, bgf1 0, bgf2 0
user data 0x0
type (type string): "scanlineimage"
same file fed to oiiotool --info -v:
qc02:~ qc2$ oiiotool --info -v test01.exr
>
> Reading test01.exr
>
> test01.exr : 4096 x 2160, 3 channel, half openexr
>
> channel list: R, G, B
>
> oiio:ColorSpace: "Linear"
>
> compression: "none"
>
> PixelAspectRatio: 1
>
> screenWindowCenter: 0 0
>
> screenWindowWidth: 1
>
> smpte:TimeCode: 271733526, 0
>
>
so that makes sense, iooitool is giving me the SMPTE binary timecade value
formatted as decimal.
now, if I try to write the metadata, using something along the lines of
"oiiotool test01.exr --compression piz --attrib "smpte:TimeCode"
"271733527, 0" -o outtest.exr"
then outtest .exr give me this from exrheader:
qc02:~ qc2$ exrheader outtest.exr
>
>
>> file outtest.exr:
>
>
>> file format version: 2, flags 0x0
>
> Exif:ImageHistory (type string): "oiiotool test01.exr --compression piz
>> --attrib smpte:TimeCode "271733527, 0" -o outtest.exr"
>
> Software (type string): "OpenImageIO 1.5.14 : oiiotool test01.exr
>> --compression piz --attrib smpte:TimeCode "271733527, 0" -o outtest.exr"
>
> capDate (type string): "2015:08:10 14:21:07"
>
> channels (type chlist):
>
> B, 16-bit floating-point, sampling 1 1
>
> G, 16-bit floating-point, sampling 1 1
>
> R, 16-bit floating-point, sampling 1 1
>
> compression (type compression): piz
>
> dataWindow (type box2i): (0 0) - (4095 2159)
>
> displayWindow (type box2i): (0 0) - (4095 2159)
>
> lineOrder (type lineOrder): increasing y
>
> pixelAspectRatio (type float): 1
>
> screenWindowCenter (type v2f): (0 0)
>
> screenWindowWidth (type float): 1
>
> timeCode (type string): "271733527, 0"
>
> type (type string): "scanlineimage"
>
>
>
obviously not right... it's treated as a string. If I omit the quotes
around the timecode value, (and drop the second INT, since it throws an
error on the ", 0" without the quotes) it writes it as an INT, but still
not properly formatted in the file...
Is there any way to get a properly formatted timecode into oiiotool, or do
I need to brush up on my C and start over wuing the libraries and APIs?
Thanks,
Ben Gervais
Production Systems Supervisor & Engineer
Billy Lynn's Long Halftime Walk - Tristar Productions
+1 818 274 2371 (US Cell)
+1 416 951 1980 (Canada Cell)
[email protected]
<https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org