Can I increase a timeout for an Explicit call

Comments

1 comment

  • Avatar
    Eric Pasos

    Hi Cristian,

    While there is no timeout parameter available to be used when you have a long-running image/video processing using the Explicit method, you can perform the request in the background, asynchronously. And when the backend operation has been completed, you can use a webhook that can be linked through the parameter notification_url to get the final response JSON.

    For example, when doing an eager transformation for video:

    cloudinary.uploader.explicit("TargetVideoPublicId",
        resource_type='video',
        invalidate=True,
        overwrite=True,
        type='upload',
        eager=[
            {'format': 'mp4', 'codec': 'h264', 'quality': 'auto'},
            {'format': 'mp4', 'codec': 'h_265', 'quality': 'auto'},
            {'format': 'webm', 'codec': 'vc_vp9/mp4', 'quality': 'auto'},
            {'fetch_format': 'webm', 'video_codec': 'vc_vp9/mp4'}
      ],
        async=True,
        eager_async=True,
        eager_notification_url="https://some-web-hook-endpoint",
        notification_url="https://some-web-hook-endpoint"
        )

    Hope this helps.

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.