Handle Web hook posting multiple time for a single video upload

Hi Team,

I have a web hook configured which notifies me via an api gateway on my aws account connected to a lambda which further processes. But for webhook “video.encoding.quality.completed”, it posts to my api gateway multiple times each for a different encoded type. But I want to process my lambda once all of the encoded types are ready, any ideas on how I can handle the multiple postings for each encoded webhook for a single uploaded video?

And what encoding types are always posted for a video? Can I assume that for any video “encoding”:“hls”,“quality”:“360p” will always be done?


Hi great question,

The webhook fires for each resolution - so you know what versions are available at a given instant after upload. As I am sure you’ve noticed- the lower resolution hooks fire first - since smaller video sizes are faster to encode.

Every video will have a 240p version. But if you begin your lambda task on 240p, the 360/480/720/2160 will probably not be ready yet.

what encoding types are always posted for a video?

Other sizes are really dependent on the size of the video uploaded. For example, if you know that all videos will be at least 720p, you could wait for that resolution. If you are saving the Mp4 - you could wait for the ‘type’: mp4. result - as that is generally of a larger size, and more of the smaller versions will be ready.


@doug Thanks, it seems reasonable to check on encoding hls and quality 240p for all the incoming webhooks for a particular video as it seems to fire for every video.