Using the 'don't create thumbnails' in the video field settings whilst using Zencoder results in an invalid API request:
{"api_key":"mykey","input":"http:\/\/www.mydomain.com\/sites\/default\/files\/public\/videos\/original\/workingtitle_9.mp4","output":{"format":"mp4","video_codec":"h264","size":"640x360","aspect_mode":"preserve","audio_codec":"aac","deinterlace":"detect","audio_channels":"2","thumbnails":{"format":"png","number":0},"notifications":{"format":"json","url":"http:\/\/www.mydomain.com\/postback\/jobs"},"label":"video-2769","filename":"workingtitle_mp4_1340927600.mp4","public":1}}
Which gives you a 422 unprocessable error due to:
{"errors":["Number of thumbnails must be a positive integer"]}
Looking through the Zencoder API docs, if we don't want thumbnails, then there's no need to include this request at all.
Specifying 'Manually upload a thumbnail' will create the same error for the same reason.
Comments
Comment #1
Jorrit commentedAre you using a release version of the video module or are you using the latest 7.x-2.x-dev?
Comment #2
Tsubo commentedI am now using the latest dev version as per your guidance (re http://drupal.org/node/1664694).
If I use the 'Automatically extract thumbnails from video (with fallback to manual upload)' - then everything appears to be working ok. But I would like to use either the manual upload thumbnail option (or no thumbnails).
I'm trying to migrate a few hundred existing video files and thumbnail images from two existing file fields, so the auto thumbnail option is not an approach I work with.
I'm guessing it's a relatively easy fix to write a case around the zencoder API post handler to remove the call for thumbnails entirely when the no thumbs option is enabled, but I wouldn't know where to start?
Appreciate your help.
Thanks
Comment #3
Jorrit commentedSo with the latest -dev version the 422 error is still present?
Comment #4
Tsubo commentedyup.
I get three errors in the drupal log.
from Zencoder - "Zencoder reports errors while converting workingtitle_mp4_1341073158.mp4: Number of thumbnails must be a positive integer"
and
from Transcoder - "Video conversion for workingtitle.mp4 failed. Please check logs for debugging."
and a php notice - "Notice: Trying to get property of non-object in _video_field_convert_on_save() (line 1186 of /home/eurovisi/stage/sites/all/modules/video/video.field.inc)."
The 422 response code error is listed in the API request history of my Zencoder account.
Apologies, I should have included this info in the first place.
Comment #5
Jorrit commentedThanks for your extensive report. The bugs have been fixed in 7.x-2.x-dev.
Comment #6
Tsubo commentedJust tested the latest dev version.
The zencoder API call issue is now solved, however, after saving a node I get a status message on the node view: "Transcoding job submission was successful. Your video will be converted and published very soon....
but the placeholder text where the pending video should be states:
"The video conversion process has failed. You might want to submit a simpler video format like mpeg or divx avi.
If the problem persists contact your website administrator. Please check logs for further debugging."
There are no errors in the log, and the video does get passed to zencoder and is returned fine a few minutes later......
Does this warrant a new issue?
Comment #7
Jorrit commentedThanks, that is actually a minor issue causes by some other commits yesterday. I fixed it, you can ignore it. No error actually occurred, it only acts like it was.
Comment #8
Tsubo commentedJust confirming. Everything now working as it should.
Thankyou.