Uploading media to ftrackreview via API
2 2

13 posts in this topic

At the moment it's not possible, but it's something we have on our roadmap.

 

Right now there are two ways to get media into ftrack for review:

 

1. By using the built-in uploader and let ftrack handle encoding and hosting: http://support.ftrack.com/customer/portal/articles/1145734-ftrackreview

 

2. By hosting the files yourself and publish versions via the ftrack API: http://support.ftrack.com/customer/portal/articles/1156767-self-hosting-and-encoding

Share this post


Link to post
Share on other sites

This feature will be released in ftrack 2.2v2 and will look something like this:

import ftrack# Get a shot and a task on the shotshot = ftrack.getShot(['Piggy Bank', 'Shots', 'TV', '100'])task = shot.getTasks()[2]# Create an asset to publish a new reviewable versionasset = shot.createAsset(name='compositing', assetType='comp', task=task)# Create a new versionversion = asset.createVersion(comment='Made som changes to the helmet')# Set the path to the file that should be attached to the versionfilePath = '/Users/carlclaesson/Documents/data/helmet.mov'# Make the version reviewable by using the util function ftrack.Review.makeReviewable()# This will upload the specified file to you personal Amazon Storage and encode it to correct formats# and create the necessary components.ftrack.Review.makeReviewable(version, filePath)version.publish()

Edited by Carl Claesson

Share this post


Link to post
Share on other sites

Hi Carl
 
Is that functionality implemented now? Because at the following line of code:
 

ftrack.Review.makeReviewable(version, filePath)

 
I get the following Error:
 
AttributeError: 'module' object has no attribute 'Review'

 
Thanks

fakob

Share this post


Link to post
Share on other sites

This is included in 2.2v2 of ftrack and you need to update your api. To check your current version go to Settings -> About

On this page the latest version of the API can be downloaded as well.

 

If you are not running the latest version, you will probably be updated soon.

 

Let me know how it goes.

 

Cheers

Share this post


Link to post
Share on other sites

Hi,

 

I'm trying to use this code and I got this error when I try to execute this line:

 

ftrack.Review.makeReviewable(version, filePath)

 

# Error: ProtocolError: file C:\Program Files\VetorLobo\Alias\Maya2014-x64\bin\python27.zip\xmlrpclib.py line 1312: <ProtocolError for ftrack.vetorzero.com.br//client/: 500 Internal Server Error> #
 

We are in ftrack 3.0.12 in local server.

 

Any idea?

 

Thank you.

Share this post


Link to post
Share on other sites

Hi,

 

The 'makeReviewable' method is only available to our cloud hosted customers, but the method should present a prettier error than a server error.

I'll look into what is causing the server error.

 

See this documentation for hosting and encoding locally: http://support.ftrack.com/customer/portal/articles/1156767-encode-and-host-local-files

 

Note: Don't mind the red warning. The documentation on encoding/hosting is still accurate.

 

Regards,

Carl

Edited by Carl Claesson
Added note on documentation warning.

Share this post


Link to post
Share on other sites

Hi Carl, thank you for the answer.

I was confused about the warning.

 

So, I coded a video in webm and I use this code to publish version:

shot = ftrack.getShot(['vetorlobo-development', 'SEQ01', 'SHOT03'])task = shot.getTasks()[2]asset = shot.createAsset(name='compositing', assetType='comp', task=task)version = asset.createVersion(comment='Made som changes to the helmet')filePath = 'C:\\DOC\\FTRACK\\TEMP\\videos\\CAIXA.webm'# Create a webm componentwebmComponent = version.createComponent(name='ftrackreview-webm', path=filePath)# Meta datawebmMetaData = json.dumps({'frameIn' : 0,'frameOut' : 720,'frameRate' : 25})webmComponent.setMeta(key='ftr_meta', value=webmMetaData)version.publish()

But the video file is not uploading to ftrack server.

 

And the version is created but when I press Play button this message appear:

 

Could not load media. Please try again.

 

Any idea? Anything wrong?

 

Thank you,

Aline Lima

Share this post


Link to post
Share on other sites

Hi Aline,

 

When running locally you'll need to setup your own hosting and encoding to manage files for review. To do this you can convert the files to mp4 and webm using the ffmpeg commands listed in the documentation. Once encoded you'll need to setup some kind of server to host the files, in the example we use apache.

 

I've opened a new support case about local hosting and encoding with you to keep this thread clean.

 

Regards,

Carl

Share this post


Link to post
Share on other sites

Is there a way to get a callback with the current upload status when using the makereviewable function? An option to show a percentage value of the already uploaded part of a file would be a nice feedback for the user.

Share this post


Link to post
Share on other sites
11 hours ago, Tobi said:

Is there a way to get a callback with the current upload status when using the makereviewable function? An option to show a percentage value of the already uploaded part of a file would be a nice feedback for the user.

Hi Tobi,

Unfortunately it is not possible with the current implementation. We use python requests to upload the files so technically it could be done.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2