Skip to main content
Skip table of contents

How to force the transcoder to ignore a specific filetype [VC UG]

Sometimes you don't want to transcode all files on your storage, but only some of them.

In this guide we will show you how force the transcoder to ignore a specific filetype.

This guide includes parts from a user case scenario.

In the example and guide below we will force the transcoder to ignore all ".zip" files.

Customer question;

"Every now and then, we have periodic issues with .zip file not being processed. Not every time. Most go through. Now this is in UAT so it could be how I setup our UAT environment. The issues we see are from assets that are between 300 MB to 2 GB in size. Regardless, since there’s no way for a .zip file to be encoded because no image can be produced for that, is there a way for us to configure Vidispine to not do the transcode step on a .zip file?   In other words, since files will never be "transcoded", can we have zip files bypass that step? "

Resolution;

A useful call is /API/task-definition/jobtype/{JOBTYPE}/graph (JOBTYPE=AUTO_IMPORT in this case).

You should get a view like the picture below.



Here, you want to inject the step after the media check is done (so that we know it is a zip file), and before transcode will take place. So between step 200 and 300.

The JavaScript should look like this (to get an idea of job metadata values, use an old job and add metadata=true:  /API/job/{ID}?metadata=true)

Insert the lines below using doing PUT to /task-definition/jobtype/AUTO_IMPORT/step/201

CODE
<TaskDefinitionDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <description>Task Definition designed to prevent transcoding of zip files</description>
  <jobType>AUTO_IMPORT</jobType>
  <step>201</step>
  <dependency>
    <allPrevious>true</allPrevious>
  </dependency>
  <script><![CDATA[
    if (job.getData("sourceUri").endsWith("zip")) {
      job.setData("tags", null);
  }
]]></script>
</TaskDefinitionDocument>

After you have putted, check with /API/task-definition/jobtype/AUTO_IMPORT/graph in your browser.

(It if complains about dot: sudo apt-get install graphviz)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.