Video seams to be loading multiple times

See here: https://staging.earthlingsecurity.com/test-video/

I have a video in the header that seams to be loading multiple times.

I have tried this uploading the video normally, and using jetpacks videopress. It seams, on 1st load to load the video multiple times, any reason for this?

Uploading normally:

Using videopress:

Hi Oriol,

Thanks for reaching out.
I have checked and found that when using the Video element Player option, the source video is loading twice as you reported here. I will check with our development team on this and will report it in our issue tracker for further investigation.

Thanks

We believe it’s loading the video in chunks on videopress. You’ll notice the size is different for each entry. It shouldn’t be an issue, will probably load faster in chunks too. Let us know if that helps.

image

Hi, understood, and that makes sense, ish, its still loading the full sized video at 2.1mg, also, it loads 3 times if im not using videopress too…Im using this page for further testing, but you can see the video load on any page.

The same should apply to mp4 videos – the resource will load in chunks instead of being loaded in a single request. If you really think this will affect loading speed, try uploading the video to YouTube or a similar platform instead of hosting it locally.

As I said, I tried loading locally, without using videopress, and its loading multiple times too. It would be great if it loaded in smaller chunks, but its not, juts loads 2 small ones, then 2.1mg. Google is flagging this as a “huge resource” and is effecting page load speeds. Youtube loads a ton of 2rd party scripts to the site, hence me trying videopress.

As mentioned earlier, streaming will occur regardless of the video format. Would you mind creating a test page with both videopress and default video element so we can compare? Where do you see the “huge resource” flag?

Im not talking about video format, the format is mp4, im talking about how I add it to the page, either using videopress, or embeded with just wordpress, it loads multiple times, so its not videopress doing this, its the theme…you can see the page here:

Please remember its on 1st load, anything after that is cached.

Google page speed is flagging it:

Yes, we understand what you’re trying to say. In the screenshot above, Google is referring to the total size of the video. If you want to address that, you’ll need to compress the video further or decrease its dimension to reduce its file size. Please note that this is not due to the theme – it’s how the browser load or stream video files and the theme doesn’t have control over it.

So the multiple loading of the video is not a theme issue, rather how the browser loads it? correct?

Yes, it’s how the browser handle media files such as mp4 videos. It doesn’t necessarily load the video multiple times, the browser loads it in parts or chunks separated through multiple requests.

I think othertwise. I just did a test by adding a page, using videopress’s block, and on that page, the video loads in bite size bits, not the full 2.1mg’s…

https://staging.earthlingsecurity.com/video-test-2/

So I do think its how its being implemented in cornerstone that is causing the huge load.

The browser still loads the video as partial content (206) which is the same as how it is loaded using the Video element. It does separate the audio and metadata, but the way the video loads is the same. Again, if you want to improve the site performance or address the Google report, you have to find a way to decrease the file size of the mp4 video or use a static image.

You are wrong! look at the sizes, there is no 2.1mg file now, using their embed code. This is how it should load right? lots of smaller chunks, to avoid the huge payload warning…

Using your video loader, it loads the video in at 2.1mg

Using videopress’s shortcode, it loads in lots of small chunks, none of which ar more than 900kb

What do you mean by 2.1mg? The way the video is loaded will not actually help with the huge payload warning as long as the overall file size of the video is still the same. Have you tried using a video with a smaller file size? Do you get the same payload warning?

2.1mg as in the size of the video, when your cornerstone video player loads it…

Look at the entire thread above, and the screenshots of how the video loads using your video player. It loads in at 2+ mg’s…

When I use videporess’s shortcode, it loads in in multiple chunks, but none more than 900kb…

Thus, your player is loading the entire video’s 2+mg’s instead of loading it in chunks of smaller bits, as per videopress’s shortcode.

This won’t really matter because the total file size of the video is the same after loading. You can read more about it here: https://developer.chrome.com/docs/lighthouse/performance/total-byte-weight

The only way to address the huge payload warning is to decrease the file size of the video and the other resources listed in the insights report.

This is becoming a little frustrating now, if Im being honest.

I know my video is 2+mg’s in size, its a video, that I dont want to pixelate, this is why Im using videopress to host the video.

The issue comes with cornerstone implementing said video. If I just ad the url in your standard video player, it loads it in one big chunk, which is bad for page load.

If I use videopress’s shortcode, it loads how it should load, in bite size chunks, and gets rid of the huge payload warning.

Anyway, thanks for not very much, all I can come away with, with this thread, is to use videpress’s shortcode to add a video, instead of your standard player.

Thank you for the info. The only definitive way to test this is to create two pages with the identical content – one with the standard Video element and the other with Videopress shortcode. You can then run both pages in the page speed insights tool and compare the results.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.