Cloudflare Stream Beta Feedback



Today we are launching a very limited beta for the new Cloudflare Stream video product. This topic will be for participants to provide feedback, ask questions, and answer questions from Cloudflare Staff.

Space is limited, but if you are interested in applying to participate you can do so here, but spots are not guaranteed.

To learn more about what Cloudflare Stream is, you can read this recent post from our blog.

You can also learn some of the background in this post.

Remember, all feedback is welcome. And please provide as much context as you can about your particular use case and how to recreate an issue (if applicable).


Hi I’ve been trying out the Stream beta the last couple of days. We are very excited about the product. I haven’t been able to successfully upload a video yet. I have tried two methods both of which gave me an error. I tried with a couple different videos and same results each time:

Method 1 - TUS from command line.

  1. install tus on my mac (sudo -H pip install -U -> Successfully installed
  2. run
    tus-upload --header X-Auth-Key [APIKEY] --header X-Auth-Email [My Account Email] sample.mp4[My Zone ID]/media
  3. results from command line
    INFO Uploading 383631 bytes chunk from offset: 0
    tus.TusError: Upload chunk failed: Status=504
    (seems to take about 5 min to fail and return error)

Method 2 - upload file with javascript web app using tus-js-client

  1. in web app select file then call the following javascript:
    upload = new tus.Upload(videoFile, {
    endpoint: ‘[My Zone ID]/media’,
    retryDelays: [0, 1000, 3000, 5000],
    overridePatchMethod: false,
    ‘X-Auth-Key’: [APIKEY]
    ,‘X-Auth-Email’: [My Account Email]
    onError: function(error) {
    console.log("Failed because: " + error)
    onProgress: function(bytesUploaded, bytesTotal) {
    var percentage = (bytesUploaded / bytesTotal * 100).toFixed(2)
    console.log(bytesUploaded, bytesTotal, percentage + “%”)
    onSuccess: function() {
    console.log(“Download %s from %s”, upload[“file”].name, upload.url)
  2. results
    onProgress is called as the file is uploaded. the last time tus calls onProgress it says it has sent all the video bytes. Then tus sits around waiting. After exactly 5 min passes I get this response from server:
    Error 504 Ray ID:3e4d5831c98053c6 • 2018-01-29 15:54:59 UTC
    Gateway time-out
    Los Angeles
    What happened?
    The web server reported a gateway time-out error.
    What can I do?
    Please try again in a few minutes.
    Cloudflare Ray ID:3e4d5831c98053c6 • Your IP: • Performance & security by Cloudflare
  3. If I make an API call to list any videos posted to Stream API says none have been uploaded

I anyone has any idea what I might be doing wrong please let me know. :slight_smile:


Thanks @hostmaster4! We’re taking a look and we’ll get back to you.


Hi there!

I’m facing a similar issue like @hostmaster4: I can’t get the upload working with tus-upload.

tus-upload --header X-Auth-Key [ACCESS_KEY] --header X-Auth-Email [EMAIL] test.mp4[ZONE_ID]/


[2018-01-30 16:13:52,316] INFO Creating file endpoint
Traceback (most recent call last):
File “/usr/local/bin/tus-upload”, line 9, in
load_entry_point(‘’, ‘console_scripts’, ‘tus-upload’)()
File “/Library/Python/2.7/site-packages/”, line 90, in _cmd_upload
File “/Library/Python/2.7/site-packages/”, line 182, in create
tus.TusError: Create failed: Status=400

Note that the access key and zone ID are two identical strings.

I’ve also tried to upload with tus-js-client but no luck either.

Thanks for your help!


@alexosoft please note that at least one version of the docs appears to be wrong and the URL when uploading needs to be (that is, it needs /media tacked onto the end).


I did notice that error in the google doc. I did append /media as you suggested to the urls.

This morning I had a successful upload using the same code I posted above. I’m doing some more testing and will post back with results.


Ah! Fixing. Good catch.


Great!! Let us know what you think.


@dani So far so good. Playback is buttery smooth and the API is okay. Since we got a video working from the command line, we’re going to try integrating this into our management console and sending a small batch of videos and actually putting them in front of a few real customers.

There will need to be some feature to restrict distribution of a stream (either referrer checking, which I suspect a lot of customers will want since it’s common, but I don’t really like since the security level is meh), or else URL signing (e.g. the embed URL is signed with a key valid for X minutes).

Note: I’m not worried about DRM or content protection here, but people literally copying our embed code and making “tube” sites out of them.


yep we will also need something along these lines to prevent “tube” sites


@hostmaster4 yes!


@mikandi that’s great!

Restricting streaming by domain - yes. We still need to add that. Likely we will allow you to specify the list of hostnames/domains the video should play on and we won’t load the video on any other hostname.


Do the file upload limits mentioned here:

Apply to videos we upload to stream?

I ask because I am seeing some errors during uploads: nginx 413 Request Entity Too Large


@hostmaster4 good question. Those limits do not apply to Stream video uploads. During the beta, the video size limit is 2 GB.


Yesterday and today, still getting this errors. Uploads mostly don’t work. Every once and a while a video successfully gets on to stream. Mostly I get timeouts like the one below after upload, during encoding I imagine:

Error 504 Ray ID: 3e5dd94a2e1d994f • 2018-01-31 15:59:28 UTC
Gateway time-out
Los Angeles
What happened?
The web server reported a gateway time-out error.
What can I do?
Please try again in a few minutes.
Cloudflare Ray ID: 3e5dd94a2e1d994f • Your IP: • Performance & security by Cloudflare

Any ideas?


Like I presumed, my Access Key was wrong. Even though I’ve checked it multiple times, CloudFlare always gave me a key that was identical to my Zone ID. Today I checked again and the key had changed. With the new Access Key I could at least get the upload started. So there’s seems to be a bug with the CF admin area showing the wrong Access Key.

Both upload attempts with tus-upload and tus-upload-js fail however, exactly as described already by @hostmaster4.


[2018-02-02 10:15:08,132] INFO Uploading 1049253 bytes chunk from offset: 4194304
Traceback (most recent call last):
File “/usr/local/bin/tus-upload”, line 9, in
load_entry_point(‘’, ‘console_scripts’, ‘tus-upload’)()
File “/Library/Python/2.7/site-packages/”, line 99, in _cmd_upload
File “/Library/Python/2.7/site-packages/”, line 203, in resume
offset = _upload_chunk(data, offset, file_endpoint, headers=headers)
File “/Library/Python/2.7/site-packages/”, line 239, in _upload_chunk
tus.TusError: Upload chunk failed: Status=504

tus-upload-js gets stuck around the last uploaded chunk.


It should be fixed by Wednesday. Sorry for the delay!


@alexosoft That upload 504 error should be fixed by wednesday and I’ll post here once it’s fixed.


Hey folks! We just deployed an update that speeds up uploads and fixes most issues above. Just testing from my laptop, I saw about a one fifth the time for the same video file.

If you are using the client, we ask you to add the flag --chunk-size=5242880 when uploading and if you’re using an other tus compliant uploader, you will need to set the minimum chunk size to 5MB (5242880 bytes). You will get a 501 error is the chunk size is too low. This restriction does not apply if your file is smaller than 5MB.

I’ve updated the google doc to show the change in the upload command.


We signed up a LONG time ago and can’t wait to “be powered by Cloudflare Stream”. We just received an email from Andy. Soon! Very soon! :smiley: