Videos hosted in Azure Blob Storage can't be used with Cloudflare Video Transform

Thomas Lagier 0 Reputation points
2025-08-11T17:22:19.1033333+00:00

In June, videos hosted in Azure Blob Storage could be used with Cloudflare Video Transform. As of today, our integration is broken.

All videos are presenting 400 - "Failed to determine file size" errors.

We noticed this error occurring a few weeks ago but hoped it was transient. All video hosted on Azure Storage is returning this error when attempting to use Video Transform. Images are working normally, and video was confirmed working normally as of June. Some time in the intervening months, it seems to have broken. Image transform, hosted in the same Blob Storage is working correctly. The videos are being uploaded both to Azure Storage and to R2, and in R2 they are working normally.

We have:

  • Checked that the video is publicly accessible.
  • Checked that the video is not corrupted (same video on R2 is working correctly)
  • Checked that CORS is set up (shouldn’t be relevant, but it’s one of the few controls Azure Blob Storage exposes so worth a look)
  • Checked any relevant headers (no docs on this but they seemed similar)
  • Tried with a SAS URL (this adds the Accept-Range: bytes header)
  • Different permutations of video options

Failing: https://stackinfluence.com/cdn-cgi/media/mode=video,fit=cover,width=258,height=310/https://stackinfluencedev.blob.core.windows.net/shortcodes/DMnbgpFRsd2.mp4

Passing: https://stackinfluence.com/cdn-cgi/media/mode=video,fit=cover,width=258,height=310/https://assetsprod.stackinfluence.com/shortcodes/DMnbgpFRsd2.mp4

Note that https://stackinfluencedev.blob.core.windows.net/shortcodes/DMnbgpFRsd2.mp4 is publicly accessible.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pranitha Maddi 5 Reputation points Microsoft External Staff Moderator
    2025-08-12T09:09:37.79+00:00

    Hi Thomas Lagier,

    Thanks for your question on the Microsoft Q&A portal!

    It seems You're trying to use Cloudflare Video Transform (CFVT) to stream or edit a video hosted on Azure Blob Storage, but you’re getting a 400 error. That error usually means the video can't be processed because Azure isn't providing the correct information (headers) when someone tries to access the video.

    Here are the few Steps to Follow:

    1.Verify Blob Type and Public Access (Azure Portal)

    • Go to the Azure Portal.
    • Click Storage accounts, then your specific storage account.
    • Go to Containers, and select the container with the video.
    • Find your .mp4 video file.

    In Properties, check:

    • Blob type = Block blob
    • Public access = Public read access for blobs

    This ensures Cloudflare can access the file at all.

    2.Confirm HTTP Range Support and Headers

    On any computer with curl (Mac, Linux, Windows with WSL or Git Bash):

    Run this command in a terminal: curl -I -H "Range: bytes=0-0"    https://stackinfluencedev.blob.core.windows.net/shortcodes/DMnbgpFRsd2.mp4

    Check the response. You want to see:

    • HTTP/1.1 206 Partial Content
    • Accept-Ranges: bytes
    • Content-Length: ... (or Content-Range: ...)

    If you get 200 OK, 416, or no Accept-Ranges, Azure isn’t set up right yet.

    3.Update CORS and Expose Required Headers (Azure Portal)

    This allows Cloudflare to read the necessary video headers.

    • In the Azure Portal, go to your Storage Account again.
    • Under Settings, click Resource sharing (CORS). 
    •  Click the Blob service tab.
    • Click + Add or edit the existing rule.

    Fill the fields like this:

    Allowed origins-* (or use your domain like https://stackinfluence.com)

    Allowed methods-GET, HEAD, OPTIONS

    Allowed headers-*

    Exposed headers-Content-Length, Accept-Ranges

    Max age-3600

     Click Save, then wait for 5 minutes.

    4.Again, Repeat Header Verification

    Run the curl test again: curl -I -H "Range: bytes=0-0" 

    Now you should see:

    • Accept-Ranges: bytes
    • Content-Length: ...

    Cloudflare will now be able to stream and transform your video.

    After exposing Accept-Range and Content-Length, Cloudflare Video Transform will successfully detect file size and perform video operations without the 400 error. Public video URLs will transform identically to the R2-hosted counterparts.

    Please let us know if that works for you

    Please do not forget to "Accept the answer and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.

    Thanks,

    Pranitha

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.