kanstantsin.nalobin Posted February 13, 2023 Report Share Posted February 13, 2023 So i'm trying to upload a mp4 file for the review. That's what i'm doing: file_path = r"d:\FtrackPlayground\ftrackreview-mp4.mp4" assetParent = Shot['parent'] asset_type = session.query('AssetType where name is "Animation"').one() asset = session.create('Asset', { 'name': 'MY_NAME', 'type': asset_type, 'parent': assetParent }) asset_version = session.create('AssetVersion', { 'asset': asset, 'task': Shot, }) session.commit() asset_version.create_component(FilePath) session.close() I've got this from the documentation page: https://ftrack-python-api.rtd.ftrack.com/en/stable/example/publishing.html the problem is that the file won't upload. I have an empty preview thumbnail. Could somebody help? Link to comment Share on other sites More sharing options...
Patrick Boucher ftrack Posted February 15, 2023 Report Share Posted February 15, 2023 Hi Kanstantsin, You may be looking for the `asset_version.encode_media()` method if you want the file to be handled automatically by our cloud transcoder to have a web-playable piece of media and thumbnail created for you. https://ftrack-python-api.rtd.ftrack.com/en/stable/example/encode_media.html#example-encode-media Regards, Patrick Link to comment Share on other sites More sharing options...
kanstantsin.nalobin Posted February 22, 2023 Author Report Share Posted February 22, 2023 Patrick, thanks. It is indeed encoding the video! But I have a question now: how to add the encoded video that is located on ftrack server to the task? The documentation suggest that you have to have the file on the hard drive Link to comment Share on other sites More sharing options...
Patrick Boucher ftrack Posted February 22, 2023 Report Share Posted February 22, 2023 Hi Kanstantsin, Which documentation are you referring to? The file uploaded to the ftrack server and then transcoded for web playback isn't tied to the `Task`. It is a `Component` that is connected to the `AssetVersion`, which in turn is connected to the `Task`. Please let me know if this document that outlines key publishing concepts helps out. Regards, Patrick Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now