Allow for definition of encoding formats
2 2

7 posts in this topic

Per the Image Encoding documentation, the only formats that trigger an encoding event are jpg, jpeg, png, tiff, tif, bmp, pdf, psd, gif, dpx, exr, and svg. However, our studio makes heavy use of Illustrator files (.ai extension) and we need to be able to kick off this encoding somehow. Illustrator files are compatible with PDFs, so the image encoder is technically capable of the conversion. However, the web UI never sends these files to be converted because it does not consider files with the .ai extension to be images.

Since we already have the capability to run our own image conversion servers, it makes sense that we should be able to specify what formats are supported in the system settings or in the configuration file.

Share this post


Link to post
Share on other sites

I tried calling `encode_media` on the session object and got this:

>>> job = session.encode_media(component, version_id=version['id'], keep_original=True)

Server reported error: ValueError(Encoding is not supported for component with file type u'.ai'. Valid formats are: ['3g2', '3gp', 'asf', 'avi', 'drc', 'flv', 'm2v', 'm4p', 'm4v', 'm4v', 'mkv', 'mng', 'mov', 'mp2', 'mp4', 'mpe', 'mpeg', 'mpg', 'mpv', 'mxf', 'nsv', 'ogg', 'ogv', 'qt', 'rm', 'rmvb', 'roq', 'svi', 'vob', 'webm', 'wmv', 'yuv', 'jpg', 'jpeg', 'png', 'tiff', 'tif', 'bmp', 'pdf', 'psd', 'gif', 'dpx', 'exr', 'svg'])

This is moving out of 'feature request' and into 'bug' territory. Can your devs point me to how I can add the '.ai' format to the encoding list?

Share this post


Link to post
Share on other sites

Hi Jen,

How are you uploading these files, and can you run the encoding client-side somehow? We have an example of using ftrack Connect to publish image sequences which are rendered as a movie by ffmpeg and then uploaded as the ftrackreview-mp4 component. If you're not using Connect, you could do something similar with an event listener watching for new publishes.

https://bitbucket.org/ftrack/ftrack-recipes/src/master/python/events/encode_image_sequence/

Share this post


Link to post
Share on other sites

Uploads are happening via drag-and-drop, but I was hoping I wouldn't have to go the event-listener route because I've had missed events if the event listener process is down.  I'd feel better if I could have multiple event listener processes running at the same time, but if I recall that just caused events to be processed multiple times.

Share this post


Link to post
Share on other sites

You're self-hosting, right? There are a couple things you'd have to do to make the server handle it "natively". One is create a setting, ftrack.image_conversion_formats, a comma-delimited list of supported formats. The other is update or replace the image-encoder service to handle .ai files. We use the ImageMagick tool, convert, which should support .ai files with some added dependencies. I have not personally tried the above steps.

Share this post


Link to post
Share on other sites

A means for specifying the formats was precisely what I was asking for in my original post! I have just tried adding the ftrack.image_conversion_formats option and it works perfectly. It would be great if this option could be documented on the Image Encoding page for future reference.

Thank you!

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