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