should embedding video in home page slow down the page? - html

If I embed a video demonstrating my application in my home page, will it slow down the page to a considerable amount?
I tried, and checked that it takes almost 1 sec, to load the preview of the video.
And as the video stream will not be downloaded until, the video is clicked, the total video do not have to get downloaded.
Is it recommended to embed a video in the home page? Or should I just keep it in a different page and put a link in the home page.

If you are embedding a flash flv video then yes, it could slow the page load down. This is because the page will need to load the flash plugin in order to get the content size, etc and render the initial frame etc.
Doesn't mean it's a bad thing though. It won't be an extreme slowdown (flash is pretty highly optimised nowadays), so instead evaluate on how it looks rather than performance unless you are trying to eke out every dreg of performance on your page load :)

Here one way you can have your cake and eat it too:
Don't put the flash player on the page that you will load by default....
Put in an image that looks like the player instead (it should be much lighter) .
If / when your user clicks on the player image, load in the flash player and play.

Every object you add to a page can slow down the page's loading time. In general don't include anything if the load time isn't worth the added benefit of having that item.
That being said, you can optimize the page by doing some tricks so that the page renders and THEN the flash video loads. You could pre-generate a thumbnail of the flash player/video and put it on the page in the same place as the video, then on page load use javascript (jquery: $(document).ready()) to create the flash object. This may improve the perceived performance. Even better, you could defer loading the video until the user clicks a button or something.

Everything you embed will slow down the page's initial load.
You have several options: (A) embed the video in its native format (mpeg, avi, etc) or (B) convert it into Flash. A good thing about flash is that it's near universal and highly optimized, so loading the flash plugin takes little time.
The whole video needn't load for the page to finish loading (only the player), so if we're just talking about 1 video, it would make sense to embed it in the page so as to provide a better user experience.
Have a look at both of Mr. Shiny and New's points. They're valid as well.

Related

Html videos loading very slow

I have videos on my website that are taking very long to load.
I don't think it is my webhost since it also happens on localhost.
Each time there is only 1 video shown to the user, depending which category they chose. (So it is not loading each video always).
The videos that take longer to load are the bigger ones (the biggest one is about 351MB video file)
This is my html code for the video:
<div class='video'><h2>$vidTitle</h2><video width='640' height='360' controls preload='metadata'><source src='$viddir' type='video/mp4'></video></div>
I've also read that it could be that the video indexing could be at the end, could this be the case?
What can I do about this, do I need to use another player thann the default html5 player | do I need to use a cdn?
How can I solve this?
Thanks!

Source of YouTube video can't be find on HTML

I just wondering how youtube displays the Video on their web app without the tag?
I also want to implement that kind of technique from my other future web apps.
TL;DR
It's because the video is streamed asynchronously, and not loaded at once. In HTML you will only find a player-container, which is a placeholder for the frames to be fed into it.
A bit more
When you click on a video, the metadata of the video loads first (title, description, etc.), then the stream flows through a socket, depending on the settings you have.
If there were a a fixed source in the HTML for which the video is loaded, changing the settings (playback speed, resolution, etc.) would have resulted in a page refresh!
In addition, YouTube prevents un-permissioned video downloads for a while now, another reason why not to provide a direct source to the video blob.

Optimize multiple HTML5 Videos

I have multiple HTML5 videos on a webpage I am creating. They autoplay and loop like gifs.
However, the page barely loads with the 6 or so 15 sec videos. Is there a way to optimize these videos so that the page loads them and itself faster?
EDIT:
Most Buzzfeed pages have dozens of video "gifs" on one page and they load fine. I'm wondering how I can do this? Currently the browser becomes overloaded.
Most devices have optimised hardware and software to play videos, to reduce CPU and preserve battery life for example.
Once you ask the device to play multiple videos at the same time you start to overload any optimal paths and playback may fall back to software to do all the heavy lifting.
One way round this, if your particular application will work with the approach, is to combine the videos on the server side into a single video.
You can still make this look like separate videos, by hiding the main controls and adding overlays with individual buttons over the relevant area.
If this does not work for you, then making the videos as low bandwidth and as short as possible will help. If you can avoid autoplaying this will obviously make a big difference also.
As a note, Buzzfeed does have multiple videos on a page but they do not auto play when I look at their pages, which means all they have to download and display is the thumbnail (maybe we are looking at different pages - if you have an example page that autoplays multiple videos, can you give a link?_.

Issues with html5 video driven site

I have a website where upon loading, a 9 MB video autoplays. I also have it so that whenever a user clicks off the homepage using the navigation bar, a 2MB video plays before it ultimately goes to it's target destination. The issue is that while the 9MB video loads seamlessly, the 2 MB ones lag behind and the full video doesn't play before it goes to the other page. I even have it so that there is a delay before it switches to the other page via jQuery, so the video can finish.
Is the lag caused by the fact that the videos need to load fully and my ISP isn't fast enough, or is there a way to actually speed them up? I am fairly certain that the answer is the former, but I am just wanting to make sure.
http://www.brokenrecordsaustin.com/test/
Click on "Us" to see what I mean.

Integrate a mp3 player into a page with no reloading issue

Is there any way to integrate an flash mp3 player into a html site where an reload wouldn't stop music playing or make it start from beginning.
I wouldn't want to use ajax for the rest of the site cause it's not SEO friendly, and also pop-ups are not a good solution cause every browser nowdays blocks them.
AJAX can be made SEO friendly as long as you create distinct urls for the pages you are pulling in. One solution I have seen to this is to use a pop up for the player, and they are easily unblocked.
without pop-ups, ajax, or a full flash site, there is no way to prevent this.
You could have a container page that plays the MP3, and contains a 100% wide, 100% high IFRAME that embeds the actual site. However, this has numerous SEO and usability implications that you can look up under the keyword of "frames."
You could use frames. Put the player in a frame of its own and only change the other(s). But I think a reload would still reload all the frames unless you loaded the page then redirected so that clicking the reload button in the browser only reloaded the redirected page.
You're going to jump through some hoops and have to do some things that are not SEO friendly to get this to work. If you get it to work at all.