Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using zencoder option - I have implemented a rule to fire an email to a node author on the event 'after video encoding success' - which I assumed would fire when the video file is successfully returned from Zencoder (on postback).
However, the rule is firing on node save or on cron, depending on which option I use (i.e. on successfully submitting the file to Zencoder)..... not after encoding success.
This needs fixing so the event is only triggered on postback, otherwise, in my case, users are informed that the video has been processed prematurely.
Comments
Comment #1
Tsubo CreditAttribution: Tsubo commentedfixed typo in title.
Comment #2
aasarava CreditAttribution: aasarava commentedSame problem here.
It seems the "video_success" call is invoked in the process() function in includes/Conversion.inc. But when you use Zencoder, the process function queues up the job, so calling video_success here would be too early. Maybe it makes more sense to move the video_success and video_failed events to the TranscoderAbstractionFactories for ffmpeg and zencoder?
The other issue that would pop up with Zencoder is that multiple outputs result in multiple postbacks. Either we need to consolidate outputs into one job request, so that there's only one postback (if that's possible). Or else, we need to track how many outputs (presets) were requested and only fire the success event once the last one comes back and is successful.
Jorrit, what do you think?
Comment #3
Jorrit CreditAttribution: Jorrit commentedI know this is a bug and what causes it, I just haven't had time to fix it. Ideally, the rules functionality would be put in a separate submodule and greatly improved.
For the multiple videos per job there already is a ticket #1547122: Support multiple outputs per job for zencoder. Until that is implemented, I think I will fire an event for the first successful postback. It is not ideal, but the best I can do now.
Comment #4
Jorrit CreditAttribution: Jorrit commentedComment #5
aasarava CreditAttribution: aasarava commentedIf the patch for multiple outputs (#1547122) looks good, then it should be fairly easy to check in processPostback if a Zencoder job is finished, like so:
This should only get triggered once, after all outputs have been converted by Zencoder.
Comment #6
Jorrit CreditAttribution: Jorrit commentedFixed in 7.x-2.x-dev. Your patch for #1547122: Support multiple outputs per job for zencoder is not necessary for this change.