Jump to content

Fails to encode media


John

Recommended Posts

Hello,

ftrack fails to encode mov file using API.

I tried mov encoded with Apple ProRes 4444 and Apple ProRes 422 HQ but both failed. The status shows up "Failed" in Jobs slider.

The way I'm encoding it is:

asset_version.encode_media(media_path)

Also I tried encode a media on ftrack.server but didn't get any luck.

It works with pictures though.

Any clue? Thanks.

Link to comment
Share on other sites

@John Su,
I've finished off testing now the remote encoding using as example a file (ProRes HQ 422 ) I downloaded from here

the encode has been done with the following code:

import ftrack_api
session = ftrack_api.Session()
version = session.query('AssetVersion').all()[-1] 
version.encode_media('c://path/to/PRORESHQ.mov')

The remote encoding task finishes successfully and I can play back the video in the component.

Hope it helps.
L.

Link to comment
Share on other sites

So i've been using an ffmpeg script to create high quality h264 versions of everything before i upload and that works fine every time.   I tried a bunch of different things before that.  (let me know if you want the script)

I'm super interested in the "proper" Prores Workflow though. Soon i'll be creating those for editorial purpose, but i hadn't thought about actually uploading them.  I was planning to just make an h264 as well as a ProRes from existing CG frames.  

Would love to know workflows/strategies people are using. 

Right now i'm using "encode" simply becaqse it creates the thumbnail for me.  But i think i'll likely switch over to just uploading the thumb myself so i avoid all "in server" processing.   Is that an option?  I found the "encode" example on here and it worked so i used it.  But I'd love to just upload something in the correct format for it to play directly, and upload the thumbnail myself as to require 0 actual encoding on the server.  Would love to know the "correct" workflow for that.

Link to comment
Share on other sites

Hi @Tom Mikota I know well what you are doing as I've been doing this with Ffmpeg before :) and I can confirm all works as it should.

My suggestion is to produce  two videos, one prores 4XX for local review purposes and one mp4 for web review.
To manually set the video you can use this : http://ftrack-python-api.rtd.ftrack.com/en/stable/example/web_review.html?highlight=upload
which won't re encode it .

 

Hope it helps.
L

Link to comment
Share on other sites

  • 3 weeks later...
On 7/15/2019 at 4:53 PM, Lorenzo Angeli said:

Hi @John Su, 
please have a look in here, by the end you'll find instructions on how to access the logs.
Cheers.
L.

Hi Lorenzo,

Sorry for the late reply.

The log mentioned in the link is ftrack-connect log and doen't appear to provide anything to do with encoding. (I closed ftrack-connect, deleted the log files, encode media using python and the log remains empty after failed.)

If there's any log carrying encoding information I assume it's located on the server side.

Link to comment
Share on other sites

/******************* Start **********************/
Event Type: localencoder
Timestamp: 2019-08-08 17:01:40.008026
-------------- Event specific data ---------------
>>>>>>>>>> Create ftrackreview components
Encoding component u'f870ef4c-101e-4fab-bc01-ed7e6cd1482b' using local encoder.
ERROR:ftserver.lib.ftrackreview.componenthelper:Encoding job failed.
Traceback (most recent call last):
  File "/tmp/pip-install-ZcDoik/FTServer/ftserverb/ftrackreview/componenthelper.py", line 232, in create
  File "/tmp/pip-install-ZcDoik/FTServer/ftserverb/ftrackreview/encoder/ffmpeg.py", line 253, in updateComponents
  File "/tmp/pip-install-ZcDoik/FTServer/ftserverb/ftrackreview/encoder/ffmpeg.py", line 155, in encode
  File "/tmp/pip-install-ZcDoik/FTServer/ftserverb/ftrackreview/encoder/ffmpeg.py", line 77, in _runCmd
  File "/opt/ftrack/pythonb/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/opt/ftrack/pythonb/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Happen to find this link. Above is the log found in /tmp/ftrack_reg_worker_00.log.

The media path I used to be encoded is a windows local path, and the ftrack server is using linux, so the path cannot be accessed by the server directly(but can if there's upload process during version.encode_media()). Could it be the reason?

Link to comment
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
×
×
  • Create New...