Problem

In 2018, your using Zencoder and your videos no longer convert. Originals get uploaded, converted files don't however upon checking Zencoder website for recent jobs, all videos do in fact get converted fine. Watchdog spits out a generic message saying Zencoder has errors along with a php notice, and a php warning (3 watchdog reports total) from files inside the Zencoder library (unrelated to this module itself). You didn't change anything and don't know why it stopped working.

Although the first thing I did was remove all video fields from my content types and completely uninstalled the module / re-install. I did this, but you might not have to. Upon re-installation I did see the same error messages however.

Solution (workaround)

According this fresh issue here: https://github.com/zencoder/zencoder-php/issues/29

It appears that a recent change with zencoder could potentially be the problem. I applied the "quick and dirty" fix as suggested in the first post and it has solved my problem.

I wanted to share this here in case anyone else has this problem using Drupal, and save them hours (especially for the novices like myself).

Here is the code, copied from the source.

Navigate to sites/all/libraries/zencoder/Services/Zencoder.php

Adjust the "if empty headers" function on line 234 like so:

if (empty($headers['Content-Type'])) {
    if (empty($headers['content-type'])) {
        throw new Services_Zencoder_Exception('Response header is missing Content-Type', $body);
    } else {
        $headers['Content-Type'] = $headers['content-type'];
    }
}

This would be a temporary workaround until a new release of the zencoder-php library. I am using Drupal 7 version of this module. Not sure if the 8 version ships with the zencoder-php inclusively, in which case I don't know if the above fix will work or not.

Comments

TheWinkingSkeever created an issue.

Rhino-new’s picture

Thank you.