Ali ECS to OSS transfer mp4, speed explosively slow, solve!

because the video is large, the upload progress should be displayed, so there are two steps:
1 users select the temporary directory where the files are uploaded to ECS in the browser, and cron cleans the directory regularly;
2 users fill in the video introduction, submit the form to ECS,ECS for verification, store it in the database, and forward the temporary video to OSS.

I posted a 27MB mp4, that takes about 25 seconds for the first step and 20 seconds for the second step, which means it will be stuck for 20 seconds when submitting the form!

Why is it so slow? isn"t it Ali"s intranet from ECS to OSS? It should be soon, isn"t it? (both ECS and OSS are in East China 1)

Thank you!

=

now I suddenly think of another problem: for uploaded videos, our backend (PHP) must extract the first frame of the video stream as the poster (poster) for the front end to display the video list. If we send the OSS directly, we will not be able to get the video extraction image at the backend!

this picture is very important because it is displayed on the video list page, so it must be there. At present, our PHP has been able to extract the first image, and there doesn"t seem to be a good way at the front end, so we generated the image when we received the video on ECS.

what should I do about this? Thank you!

Mar.09,2021

OSS can be transmitted directly by authorization. ECS only needs to send Token. After the client gets the Token, it can be directly transferred to OSS,. There is no need to go to ECS for transfer. For more information, please refer to the best practices in the OSS documentation.

< hr >

second question: OSS video clip


first, I think there are two steps for file upload.

1. C().
2. PHPOSS.

your time can get a point, 25 + 20 is 45 seconds, not the so-called 20 seconds. How to optimize this? can I upload it directly to oss, through the front end so that I can skip the first step and reduce it by at least 20 seconds? And this time is related to the speed of the browser. Just enter the background directly into the library.
as to whether the file is wasted, just clean it up regularly.


Don't do this. It will consume a lot of your ECS traffic. You should consider OSS STS authorization, which can be uploaded directly to oss by the client: https://help.aliyun.com/docum.

. To put it simply, this is equivalent to the client getting a temporary STS license from your server, so that the client can upload files to OSS without being transferred through your ECS server.

it may seem troublesome at first glance, but if you upload a large video, which is in great demand, this method has the best user experience, faster speed, and does not take up the bandwidth of your ECS

.

Thank you for your friends upstairs!

now I suddenly think of another problem: for uploaded videos, our backend (PHP) must extract the first frame of the video stream as the poster (poster) for the front end to display the video list. If we send the OSS directly, we will not be able to get the video extraction image at the backend!

this picture is very important because it is displayed on the video list page, so it must be there. At present, our PHP has been able to extract the first image, and there doesn't seem to be a good way at the front end, so we generated the image when we received the video on ECS.

what should I do about this? Thank you!

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1beac66-31a3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1beac66-31a3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?