0

Adding metadata to an rvio overlay

Hi lovely Tweak people,

 

I've seen a separate question on here that asks about having a HUD element that shows extra metadata, and this is something that I've done before, but this time I'm trying to access metadata from inside an overlay function.

 

(I have no idea how the formatting is going to work here... I've indented code, which might look okay...)

 

In my widget, I could access the attributes using:

 

    State state = data();

    let pinfo = state.pixelInfo,

        iname = if (pinfo neq nil && !pinfo.empty()) 

                then pinfo.front().name

                else nil,

       sourceAttrs = sourceAttributes(iname);


However, if I try to do the same code in my overlay function, it raises an exception:


    ERROR: caught exception from myburn.main (void; int w, int h, int tx, int ty, int tw, int th, bool stereo, bool rightEye, int frame, [string] argv)

 

Which, from commenting lines out, seems to be coming from this line:  let pinfo = state.pixelInfo


I'm guessing that data() is returning NULL in this case.


Any ideas?


Thanks all!


Hugh

8 条评论

  • 0
    Avatar
    Alan Trombla

    Hi Hugh,

    I'm sorry to say that this is not possible at the moment.  Fundamentally the problem is that the rendering process in an RVIO overlay function is really completely different from that in an interactive RV Session, to the point that "the session" is not the same, and certainly there is no "State" object (since it is maintained by the interactive scripting code, not by the core).  At the moment really the only data you can access in an overlay function is that in the arguments to the function.  My recommendation would be to try to provide all the data you want to render in your node on the command line, since this will show up (in argv) in the arguments to the main function.

    In the long term we plan to extend the RVOverlay node support so tha rendering of this kind can be done within the core rendering process (so to get particular metadata rendered, you'd write a particular overlay node in the session, instead of writing Mu rendering code).  Then this kind of thing will work exactly the same way in RV and RVIO.

    Sorry to not have something more helpful to say!

    Alan

  • 0
    Avatar
    Hugh Macdonald

    Thanks Alan,

     

    That's good to know (well, less good, but at least I won't spend time trying to figure it out!)

     

    If I pass in on the command-line something like "-outparams tv/time_code=02:15:23:05", can I access this (incrementing) timecode in an overlay function? Or will I need to pass in the start timecode as a parameter to a separate "-overlay" call and do the incrementing by hand?

     

     

    Thanks

     

    Hugh

    For now, I 

  • 0
    Avatar
    Alan Trombla

    Hi Hugh,

    Yes, I'm afraid you'll have to do the incrementing yourself.  Encoding parameters like that go straight to the encoding plugin, and are not accessible in any "live" way.

    Cheers,

    Alan

  • 0
    Avatar
    Hugh Macdonald

    Thanks Alan,

     

    Now I know how I should be going about it, I'm sure I'll be fine with it.

     

     

    Cheers

  • 0
    Avatar
    Zeph Chai

    Hi,

    I am also trying to do the same thing, getting filename and metadata of the current file. So I assume there is no way I can get the current filename during overlay?

    Thanks,
    Zeph 

  • 0
    Avatar
    Zeph Chai

    Ok... Seems like I found a way to do it using sourceAttributes. There is a File attributes.

    Cheers,
    Zeph 

  • 0
    Avatar
    Loïc Poës

    Hi there,

     

    Anybody to explain how to get filename and/or other metadata overlaid on an RVIO output file?

    Thx,
    LOIC

  • 0
    Avatar
    Jon Morley

    Hi LOIC,

    There isn't anything for placing arbitrary text on the frame out of the box. Can you please explain further what kind of information you want to burn into the image?

    What is your desired workflow from end to end?

    Thanks,
    Jon

请先登录再写评论。