Uploaded presets take long time to load on mobile devices
Hi
It seems there is quite a load time for longer videos in mobile devices.
Through our web application a video is uploaded using signed upload preset and rest api.
That part works fine and a secure url is generated which is then passed to the mobile app.
It takes quite a while for the video to play on the device.
E.g. a 9 min. long video takes several min. to load.
By playing the video in Cloudinary (Media Library) in advance, the video plays immediately on the mobile app.
Seems like there's uncompleted processing, when uploaded to Cloudinary?
The tested video-files are no larger than 30-40 Mb, which shouldn't take that long to load.
And there is no eager transformation.
Is there a way to optimize the load time?
Thanks.
/Kim
-
Hi Kim,
How do you delivering the video to your end user? As soon as the video is uploaded to your account, the original video should be available immediately. The very first request of course can be a little slow, since our CDN needs to fetch the video first. But any subsequent request will be faster since it's now cached on CDN.
However, if you are delivering with some transformation, then the delay may because the transformed video needs to be generated first. This can be prevented by using eager transformation (and with eager_async: true)
Hope this helps.
0 -
Hi Erwin
Thanks for replying.
The videos are delivered using jquery and api-call.
Example:var cloudFormData = new FormData();
cloudFormData.append("api_key", result.apiKey);
cloudFormData.append("file", cfile);
cloudFormData.append("folder", folder);
cloudFormData.append("signature", result.data);
cloudFormData.append("timestamp", timestamp);
cloudFormData.append("upload_preset", "test");
fetch(url, {
method: "POST",
body: cloudFormData
}).then((response) => {
return response.text();
}).then((data) => {
var datafetch = jQuery.parseJSON(data);
formData.append("mediaUrl", datafetch.secure_url);No transformations are processed during the upload and neither eager transformations.
Makes sense that the first fetch takes a long time, as after the first fetch the videos are played immediately.
Is there anyway to improve the first fetch?
Thanks.0 -
Hi Kim,
Do you mean you are delivering original videos (without transformation)? You could create a support ticket to us thru https://support.cloudinary.com/hc/en-us/requests/new and share with us some example URLs so we could check on them.
Regards,
Francis0
Post is closed for comments.
Comments
3 comments