Jump to content

Uploading media to ftrackreview via API


iheartroto

Recommended Posts

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

Link to comment
Share on other sites

  • 1 month later...

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()

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

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.

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...