Asset upload: file size limit exceed

Hello,

I am facing a problem with the editor that does not allow me to upload large files such videos.
After reading some post about file size limit I understand that for preloaded asset this is not good thing to have large files to download, but in my case I am not using preload but only the URL of the asset.

I know I can use an external server to store my media but I have a precise goal to achieve.
I will deliver the project build to the client for self hosting and I want all the assets to be inside the project directory and also able to work offline.

I subscribed to the organization plan to have access to 50GB storage and I am sad that I can use it.

Thanks for your answers.

Hi @hadrienestela,

I wasn’t aware there is a max file size limit in the editor. What is the file size in question?

Calling @vaios @will @yaustar, they can comment further on this.

1 Like

500MB And this is a small one, for tests.
I will use 360 videos in 4K of about 5-6min each. :grimacing:

1 Like

Hi @hadrienestela,

I understand you want to host the videos on Playcanvas, but I would still strongly encourage hosting the files elsewhere, so you can save your Playcanvas space for project files that are actually required by the engine. You will also likely get better response and load time by hosting them on a dedicated host/CDN. You would also have better control of how your responses are returned to the user. I am not sure if audio/video files on Playcanvas are returned with accepted-ranges or support Partial Content responses, which would decrease the need for the user to download the entire video at once.

However, if you are sure that you want to keep them on Playcanvas, I would even more strongly encourage you to try and reduce the filesize of these videos. I am also working on some heavily 360 video oriented scenes with longer videos in similar lengths to yours, and I have been able to keep much smaller file sizes by adjusting the bitrate of the videos in Adobe AfterEffects. Of course this comes at the expense of quality if you reduce the bitrate too much, but given that your project is internet oriented, multiple >500mb files will be out of reach for a number of users, especially on slower connections.

Experiment with lowering the bitrate of your videos until you reach a balance with quality and filesize that you can live with. My largest videos are only around 100mb for the lengths you described, and there are a few artifacts, but it does not detract from the entire experience.

I hope this is helpful!

2 Likes

Hello @eproasim

As I previously said, I am not downloading the file on client side, I just use the URL of the asset.

I am not planning to host the project on PlayCanvas but I need that ALL the assets be INSIDE the project directory NOT in external url. I will not host the project myself but I will deliver the content to host to the client.

I need relative urls for the media files because I CANNOT host the files on their final destination right now and I also don’t want the files be hosted on another place than the project itself.

I also need the project to be able to be ran OFFLINE if needed, without internet connection on a local http server.

Concerning the file size of the videos: I will obviously make them as small as possible but I can’t degrade the quality because this is a project for a world famous brand and they have high expectations.

Like I said before I subscribed to the ‘organization’ plan to be able to use 50GB of storage and host files that I need for a project concerning 360 videos, 360 images with interactions and 3D models.

If I can’t use it I will return on a lower plan or maybe search for another better solution than Playcanvas to achieve my goals. :man_shrugging:

@hadrienestela I believe the reason for the limit is how we store assets within the backend technologies we are currently using. @vaios may be able to explain more.

This is unlikely to change in the short term as it has been rare that any project has needed an asset that is >500MB so far.

The workaround I would do for this is to host either the files elsewhere/degraded version on the project but have some code that checks window.location if it’s running from the launch tab/publish URL.

If it’s not, then it can change the base path to be relative to the project so that when you give the project to the client, you can include the videos as part of the zip.

eg


var filename = 'somevideo.mp4';
var filepath = '';

if (window.location.href.startsWith('https://launch.playcanvas.com') || window.location.href.startsWith('https://playcanv.as')) { 
    filepath = 'https://someprivateserver.com/somefolder/' + filename;
} else {
    filepath = 'videos/' + filename;
}

While still not ideal, it would allow you to add all the videos in a local folder to the project after you’ve published it to a zip. The client can then self host either offline on a local http server or on their own site with needing the external server.

If you decide to transfer the project to the personal plan, give me a DM with your PlayCanvas username and I can give you voucher for the Personal plan for a month to cover overlap of payment periods between the two.

2 Likes

Submitted a feature request for this as I think there will be a growing need for this: Allow users to upload very large files to 'shared' storage · Issue #486 · playcanvas/editor · GitHub

2 Likes

hi @yaustar, Thanks for your answer.

I realised that the file size limitation is certainly related to git versioning to avoid revision of large files and don’t let the repository growing fast.

I can try to keep my files as low size as possible but I can not be sure it can be done on all videos without losing too much quality. I will try your workaround by using relative path references in my sources and using external host basepath while working on Playcanvas & a Local basepath once the project exported.

Thanks.

We don’t use git under the hood but yes, it does impact storage quotas as each checkpoint in version control is a copy of the project. This is limitation on how projects are stored on the backend.

I think the workaround is your best bet as like you said, you want to be able to have the highest quality videos as possible.

Another alternative (and requires more work) is to use video proxies in the PlayCanvas project (smaller or low quality videos).

A script can then be used to download the build, parse the config.json for the asset registry, replace the proxy for the actual video and re zip the project to be given to the client.

Here are some tools that do similar automated things with the REST API that you can use as a base GitHub - playcanvas/playcanvas-rest-api-tools: A set of tools to use with the PlayCanvas REST API for common jobs such as downloading a build and archiving a project