Thanks Larry, as you say the oiiotool command would quickly become very long, and it's probably better to go the Python route. I'll have a look at the examples you posted.
Still, having the possiblility to read metadata via the --text option would be pretty nice. Something for the future :). Best regards, Simon ------------------------------- Simon Björk Compositor/TD +46 (0)70-2859503 www.bjorkvisuals.com 2014-08-13 23:57 GMT+02:00 Larry Gritz <[email protected]>: > I think it's actually a really cool idea! In particular, some kind of way > to retrieve any particular metadata from the "top" image. But I need to > think about what syntax we can use that won't interfere with other kinds of > shell variable expansion and whatnot. > > But also, may I suggest that you look at the Python bindings? Rather than > do something so complex as a single big oiiotool command line, maybe it's > easier to write a Python script that explicitly loops over the frame range, > and could easily extract the timecodes or whatever from the images, > manipulate the strings as you wish, and then add text annotations to the > images and save them out. > > In the oiio distribution, look at testsuite/oiiotool/run.py and > testsuite/python-imagebufalgo/test_imagebufalgo.py -- they do essentially > the same set of tests, with oiiotool on the command line, and with Python, > respectively. It's pretty easy to see what the correspondence is. > > -- lg > > > On Aug 13, 2014, at 2:28 PM, Simon Björk <[email protected]> wrote: > > Thanks Larry, works perfectly :)! > > Any chance of getting the value of other data such as > width/height/timecode as well? Or maybe that is outside the scope of > oiiotool? > > Best regards, > Simon > > > > ------------------------------- > Simon Björk > Compositor/TD > > +46 (0)70-2859503 > www.bjorkvisuals.com > > > 2014-08-13 21:11 GMT+02:00 Larry Gritz <[email protected]>: > >> Just use # in the string! >> >> >> >> On August 13, 2014 11:20:46 AM PDT, "Simon Björk" <[email protected]> >> wrote: >>> >>> Hi Pete, >>> >>> thanks for your reply and example! >>> >>> Yes, the --text option seems to do what I need - when working on a >>> single image. But what about a sequence? Is there a way for the --text >>> option to evalutate the current frame number somehow? Something like: >>> >>> oiiotool input.#.dpx --frames 1-100 --text <current frame number> -o >>> output.#.jpeg >>> >>> Best regards, >>> Simon >>> >>> >>> >>> ------------------------------- >>> Simon Björk >>> Compositor/TD >>> >>> +46 (0)70-2859503 >>> www.bjorkvisuals.com >>> >>> >>> 2014-08-13 17:24 GMT+02:00 Pete Black <[email protected]>: >>> >>>> Hi Simon, >>>> >>>> Looking at oiiotools's options, --text function should indeed do what >>>> you want. >>>> >>>> Heres a post from the list with more detail: >>>> >>>> http://comments.gmane.org/gmane.comp.lib.openimageio.devel/1371 >>>> >>>> One thing missing from the oiiotool usage info is how to encode color >>>> in the argument string. >>>> >>>> an example: >>>> >>>> oiiotool >>>> <infile>--text:x=100:y=100:color=1.0,0.0,0.0:size=32:font="Arial.ttf" >>>> "01:00:00:00" --text:x=500:y=100:color=1.0,1.0.1.0:size=32:font="Arial.ttf" >>>> "SHOTNAME" -o <outfile> >>>> >>>> >>>> Personally, I have my own set of wrappers around OIIO that I use (using >>>> the C++ API directly) for sequence processing/burnins, but oiiotool should >>>> be quite functional for this. >>>> >>>> Hope that helps, >>>> >>>> -Pete >>>> >>>> >>>> >>>> >>>> On 13/08/2014, at 3:24 am, Simon Björk <[email protected]> wrote: >>>> >>>> > Hi all, >>>> > >>>> > I just recently switched to using OpenImageIO (oiiotool) when >>>> converting dpx/exr sequences to jpegs (dailies). It all works very well, >>>> especially with the close relationship with OpenColorIO. >>>> > >>>> > One thing I haven't found a way to do though, is to add text burn-ins >>>> such as frame number and timecode. In the doc I see there is a --text >>>> option, but I'm not sure if it's ment for such usage. Is there a way to do >>>> this? If not, how are other handling this? >>>> > >>>> > Best regards, >>>> > Simon >>>> > >>>> > >>>> > ------------------------------- >>>> > Simon Björk >>>> > Compositor/TD >>>> > >>>> > +46 (0)70-2859503 >>>> > www.bjorkvisuals.com >>>> > _______________________________________________ >>>> > Oiio-dev mailing list >>>> > [email protected] >>>> > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>>> >>>> _______________________________________________ >>>> Oiio-dev mailing list >>>> [email protected] >>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>>> >>> >>> >>> ------------------------------ >>> >>> Oiio-dev mailing list >>> [email protected] >>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>> >>> >> -- >> Larry Gritz >> [email protected] >> >> _______________________________________________ >> Oiio-dev mailing list >> [email protected] >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >> >> > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > > -- > Larry Gritz > [email protected] > > > > > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > >
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
