Flame Forum
Welcome to Autodesk’s Flame Family (Flame, Flare, Flame Assist, Lustre) Forums. Share your knowledge, ask questions, and explore popular Flame topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to create a project using the Wiretap API (Linux/Python)

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Anonymous
1089 Views, 8 Replies

How to create a project using the Wiretap API (Linux/Python)

Hey guys,

 

I have the WiretapSDK_2017.0.1 installed and working (I tested some of the provided examples).

 

Anyway, I was wondering (as I'm sure many people have done this) does anyone have some documentation or examples for how to create a project through the API please?

 

Any help appreciated.

 

Thank you,

Shaun.

 

8 REPLIES 8
Message 2 of 9
mchesnay
in reply to: Anonymous

Hi Ought-o-Desk,

 

You'll find the documentation you're looking for here.

 

HTH,

 



Martin Chesnay
Learning Content Designer — EMS-Flame
Message 3 of 9
Anonymous
in reply to: mchesnay

Hi mchesnay,

 

Thanks for taking the time to reply. I'm having a read through that now.

 

If I figure out how to do it, I'll post the solution here - in the meantime though, if anyone else has already done this in python, feel free to post your code too 🙂

 

Thanks,

Shaun.

Message 4 of 9
Anonymous
in reply to: Anonymous

Sucks that there is a C++ example, but not a python example.

 

I'm not able to get the C++ one to run.

 

I tried compiling it so I could run it, but I just get this:

g++ createProject.C -o createProject


createProject.C:31:30: error: WireTapClientAPI.h: No such file or directory
createProject.C: In function ‘int main(int, char**)’:
createProject.C:55: error: ‘WireTapClient’ was not declared in this scope
createProject.C:55: error: expected ‘;’ before ‘wireTapClient’
createProject.C:56: error: ‘wireTapClient’ was not declared in this scope
createProject.C:63: error: ‘WireTapServerId’ was not declared in this scope
createProject.C:63: error: expected ‘;’ before ‘serverId’
createProject.C:64: error: ‘WireTapServerHandle’ was not declared in this scope
createProject.C:64: error: expected ‘;’ before ‘server’
createProject.C:68: error: ‘WireTapNodeHandle’ was not declared in this scope
createProject.C:68: error: expected ‘;’ before ‘parentNode’
createProject.C:69: error: expected ‘;’ before ‘projectNode’
createProject.C:75: error: ‘parentNode’ was not declared in this scope
createProject.C:75: error: ‘projectNode’ was not declared in this scope
createProject.C:92: error: ‘WireTapStr’ was not declared in this scope
createProject.C:92: error: expected ‘;’ before ‘metadata’
createProject.C:110: error: ‘projectNode’ was not declared in this scope
createProject.C:110: error: ‘metadata’ was not declared in this scope

Message 5 of 9
Anonymous
in reply to: Anonymous

I also tried creating a project node like this (didn't work): 

 

wiretap_create_node -n /projects -d test
Unable to create node: Node is read only

Message 6 of 9
mchesnay
in reply to: Anonymous

Try this:

./wiretap_create_node -n /volumes/stonefs -d delete_moi

The project must be created under the storage node: this is where the cache will be stored. 

 

But after the project is created, you will find it under the /projects node, like you expected. 

 

./wiretap_print_tree
Server: 'test-iMac' WireTap Version: 2018  Server Vendor: Autodesk  Product: IFFFS  Version: 2018
Printing WireTap Tree

 <node> (HOST) Node ID: /
    volumes <node> (VOLUMES) Node ID: /volumes
        stonefs <node> (VOLUME) Node ID: /volumes/stonefs
    projects <node> (PROJECTS) Node ID: /projects
        delete_moi <node> (PROJECT) Node ID: /projects/delete_moi

Note that the project is created using the default values. Use ./wiretap_set_metadata to define custom values.

 

To set the project bit depth to 10 (up from the 8-bit default):

  1. Run the following:
    ./wiretap_get_metadata -s XML -n /projects/delete_moi
    <Project><Name>delete_moi</Name><Nickname></Nickname><Description></Description><CreationDate>04/11/17 14:04:24</CreationDate><SetupDir>delete_moi</SetupDir><Partition>stonefs</Partition><Version>2018.0</Version><FrameWidth>1920</FrameWidth><FrameHeight>1080</FrameHeight><FrameDepth>8-bit</FrameDepth><AspectRatio>1.77778</AspectRatio><FieldDominance>PROGRESSIVE</FieldDominance><ProxyWidth>960</ProxyWidth><ProxyWidthHint>0.500000</ProxyWidthHint><ProxyMinFrameSize>720</ProxyMinFrameSize><ProxyAbove8bits>false</ProxyAbove8bits><ProxyQuality>lanczos</ProxyQuality><ProxyRegenState>0</ProxyRegenState><ProxyDepthMode>SAME_AS_HIRES</ProxyDepthMode><ProxyDepth>8-bit</ProxyDepth><BatchShaderPath>/opt/Autodesk/presets/2018.0/matchbox/shaders/</BatchShaderPath><ActionLightOperatorPath>/opt/Autodesk/presets/2018.0/action/lightbox/</ActionLightOperatorPath><ActionShaderPath>/opt/Autodesk/presets/2018.0/matchbox/shaders/</ActionShaderPath><ProcessMode>1</ProcessMode><IntermediatesProfile>0</IntermediatesProfile><FrameRate>29.97 fps NDF</FrameRate></Project>
  2.  Create file foo.xml and copy-paste the XML result from the wiretap_get_metadata.
  3. Search for <FrameDepth>8-bit</FrameDepth>. Change 8-bit to 10-bit.
  4. Save and close foo.xml.
  5. Back in the terminal, run the following:
    ./wiretap_set_metadata -n /projects/delete_moi -s XML -f foo.xml

If you start Flame, your project now has the updated frame depth of 10-bit.

 

HTH,

 



Martin Chesnay
Learning Content Designer — EMS-Flame
Message 7 of 9
Anonymous
in reply to: mchesnay

Thank you. That's exactly what I wanted.

Message 8 of 9
mchesnay
in reply to: Anonymous

Happy to help!

 

And your questions highlighted the fact that the project creation topics in the wiretap docs could be better. I'll try to fix it for the next update.



Martin Chesnay
Learning Content Designer — EMS-Flame
Message 9 of 9
Anonymous
in reply to: mchesnay

Hi again,

 

I've got one more query that I hope you don't mind helping me with please?

 

This is working great except for one thing. It's not letting me specify what cfg preset file I can use.

 

E.g I create a project, just like you specify, but it always puts the video preview at: VideoPreviewWindow 1920, 1080, 25000p

 

and at the top of the file, it says this:

 

This is a project template file for SMPTE-274M 1920x1080@24.000Hz progressive

 

I would like to using the template based on this one however: /opt/Autodesk/presets/2017.1.2/cfg/linux-x86_64/template/1920x1080@50i.cfg

 

The problem is that the project folder where that cfg resides isn't created until I open my newly created project, so I'm not sure how I can enforce a specific cfg upon creation (using the wiretap way you explained)..

 

Any ideas?

 

Thanks,

Shaun.

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report