Skip to main content

Trying to convert multiple video formats to mp4 on upload.

Comments

1 comment

  • Raz Ziv

    Hi,

    Thank you for your feedback.

    Cloudinary offers three different methods for manipulating your videos:

    • URL API - a URL based API for delivering resources using dynamic URLs with on-the-fly transformations. You can simply request Cloudinary's servers to generate and deliver your desired transformation by adding its instructions to the delivery URL, right before the public ID. For example, https://res.cloudinary.com/demo/video/upload/w_300,h_200/dog.mp4 will dynamically create a 300x200 resized video based on the original dog video. The nature of this method allows it to only be used synchronously.
    • Incoming Transformations - Cloudinary supports manipulating your resources before storing them in your account. This type of transformation can only be applied as part of the upload request. The transformed resource is then uploaded to your account and stored as the original resource. It can be done both synchronously and asynchronously. You can find additional information about Incoming video transformations here.
    • Eager Transformations - Allows you to eagerly create derived resources that are based on the resource that you upload (or previously uploaded - using the explicit API method). Eager transformations won't modify your original resource but will rather generate a derivative with your transformations applied. Just like Incoming, Eager transformations can be done both synchronously and asynchronously. More details can be found under the Eager video transformations section of our documentation.

    The reason why your incoming transformations fail is that you don't include the "async" => true parameter in your request. Adding it should allow you to run those transformations as incoming. You can also add the "notification_url" to your request to receive a notification once the derived video is ready. In case you use upload presets, you can set these values as part of your upload preset. When using the UI Console, the "Async" field will appear once you click on "Advanced Options".

    If you prefer storing the videos with their original format and only create mp4 derivatives, you can use eager transformations. As you've mentioned there is a small UI issue that we are aware of. Please note that this is only reflecting in the UI. Your choice of format is saved properly in the database and once you upload the video, the derived video with the correct format is generated. You can see it by clicking on the "View derived videos" buttons when accessing the edit video page. You can either do it by clicking on the video thumbnail in your Media Library or directly, via the following URL template: https://cloudinary.com/console/media_library/asset/video/upload/<public_id>

    In case you still experience any issues with transforming your videos, please open a support ticket at https://support.cloudinary.com/hc/en-us/requests/new and we will be glad to look into your request.

    0

Post is closed for comments.