Web Developer 101: Embedding Movie into Your Web Site
Web Developer 101: Embedding Movie into Your Web Site
Movie is an integral part of our lives, and its use online is pervasive. At some point every web developer wants to add some movie to their site. This tutorial will demonstrate you how to do just that–now let’s add some movie to your site!
There are some very ordinary methods to embedding movie into your web site, for example, you can use the following code: This is all fine and good if your movie clip is about ten seconds long and bandwidth and buffering times are not an issue.
If you’re finding that your movie takes a long time to flow on your site, then you can always use YouTube. It’s prompt, free and effortless. But the trade off is that you lose all control of your movie. To use YouTube, simply create an account, upload your movie, wait for it to process, then copy and paste the provided embed code into your site. The problem with this is that anyone and everyone can also copy and paste your movie into their site. If your purpose is to create a web site with sensational movie content, then YouTube is not the reaction.
If you’re not rolling your own movie, and you’re getting it from another source, then most likely you’re going to need to resize the movie. From private practice, the movie clips that I’ve received from PR firms are sized one thousand two hundred eighty x 720. A movie of that size will take up most visitors’ entire screen and you can’t demonstrate movie controls or any portions of your own site. I struggled with this issue for a long time. I thought I had to open the movie with movie maker software or do something complicated to resize it. Then I discovered all I needed was a brief snippet of code: scale, which can be set to "tofit" or "aspect" or a number. Aspect is you’re best option, because it keeps the original ratio of the movie in perspective. If you don’t use the scale code, and simply use width and height, then you will crop the movie. Also, you will not see the controller for play, pause, volume, etc. Plus, you need to add an extra sixteen pixels to the height of the movie to see the controller. For example, if the movie is sized one thousand two hundred eighty x seven hundred twenty and you set the width to six hundred and the height to 400, then a significant portion of the movie will be cropped and not seen by the visitor; you also don’t get the controls. Using scale liquidates the necessity of adding sixteen pixels, it does not crop the movie and you get the controls.
A 70MB movie at this width and height will explosion fairly quickly with minimal buffering; even however there might be a slight wait involved, most visitors will sit there for several seconds if they truly want to see the movie and they see the slider bar is enlargening rapidly.
If you use a web host service, and you get a large spike in traffic because of the popularity of a given movie, you might incur extra expenses due to significant amounts of resources being used. If you’re ramping up your site and want to join the big leagues, this will become an eventual reality.
Another potential issue, is that certain parts of your web page might not stream, or become functional, until after the movie is fully loaded. For example, I have a rotating series of pictures that did not fountain and display until after the movie finished loading. Also, I could not use my "Share This" social networking buttons until after the movie finished loading. These problems occurred in Firefox and Internet Explorer, but Chrome did not exhibit these issues. If you’re nosey as to what my site looks like and the movie that I’m referring to, you can see it here. The movie shown there was provided by EA Sports’ PR stiff.
For a professional web site, these types of loading problems are not acceptable. For an inexperienced site, however, these drawbacks could be viewed as a minor–and temporary–setback while you ramp up operations.
At this point you might be feeling a little stuck. You have this excellent, unique, off the hook movie that you want to share with the world, but you want them to view it on your site and not a hosting site. At the same time, you’re not at the point where you have the servers and the bandwidth to support 15-minute long movies without your audience having to wait ten minutes or more for the movie to buffer. Plus, you don’t want your web host company to charge exorbitant amounts because your superb movie content clogged up the tubes.
Fortunately, there are answers to this problem. One solution comes in the form of Amazon Web Services. Signing up is free and the cost to use their services are counted in pennies per GB. You only pay for the services you use as you use them. There are no monthly fees or subscriptions.
Amazon Web Services does not provide a step-by-step tutorial. However, there are slew of help files and information spread around the site. For the purposes of uploading movie, you need to use Amazon CloudFront in conjunction with an Amazon S3 bucket. From the Amazon CloudFront page:
To use Amazon CloudFront, you:
- Store the original versions of your files in an Amazon S3 bucket.
- Create a distribution to register that bucket with Amazon CloudFront through a elementary API call.
- Use your distribution’s domain name in your web pages, media player, or application. When end users request an object using this domain name, they are automatically routed to the nearest edge location for high spectacle delivery of your content.
- Pay only for the data transfer and requests that you actually use.
We’ll tell you more about Amazon Web Services in the next article!
Web Developer 101: Embedding Movie into Your Web Site
Web Developer 101: Embedding Movie into Your Web Site
Movie is an integral part of our lives, and its use online is pervasive. At some point every web developer wants to add some movie to their site. This tutorial will demonstrate you how to do just that–now let’s add some movie to your site!
There are some very ordinary methods to embedding movie into your web site, for example, you can use the following code: This is all fine and good if your movie clip is about ten seconds long and bandwidth and buffering times are not an issue.
If you’re finding that your movie takes a long time to fountain on your site, then you can always use YouTube. It’s quick, free and effortless. But the trade off is that you lose all control of your movie. To use YouTube, simply create an account, upload your movie, wait for it to process, then copy and paste the provided embed code into your site. The problem with this is that anyone and everyone can also copy and paste your movie into their site. If your objective is to create a web site with sensational movie content, then YouTube is not the reaction.
If you’re not rolling your own movie, and you’re getting it from another source, then most likely you’re going to need to resize the movie. From individual practice, the movie clips that I’ve received from PR firms are sized one thousand two hundred eighty x 720. A movie of that size will take up most visitors’ entire screen and you can’t demonstrate movie controls or any portions of your own site. I struggled with this issue for a long time. I thought I had to open the movie with movie maker software or do something complicated to resize it. Then I discovered all I needed was a brief snippet of code: scale, which can be set to "tofit" or "aspect" or a number. Aspect is you’re best option, because it keeps the original ratio of the movie in perspective. If you don’t use the scale code, and simply use width and height, then you will crop the movie. Also, you will not see the controller for play, pause, volume, etc. Plus, you need to add an extra sixteen pixels to the height of the movie to see the controller. For example, if the movie is sized one thousand two hundred eighty x seven hundred twenty and you set the width to six hundred and the height to 400, then a significant portion of the movie will be cropped and not seen by the visitor; you also don’t get the controls. Using scale liquidates the necessity of adding sixteen pixels, it does not crop the movie and you get the controls.
A 70MB movie at this width and height will stream fairly quickly with minimal buffering; even tho’ there might be a slight wait involved, most visitors will sit there for several seconds if they truly want to see the movie and they see the slider bar is enhancing rapidly.
If you use a web host service, and you get a large spike in traffic because of the popularity of a given movie, you might incur extra expenses due to significant amounts of resources being used. If you’re ramping up your site and want to join the big leagues, this will become an eventual reality.
Another potential issue, is that certain parts of your web page might not blast, or become functional, until after the movie is fully loaded. For example, I have a rotating series of pics that did not geyser and display until after the movie finished loading. Also, I could not use my "Share This" social networking buttons until after the movie finished loading. These problems occurred in Firefox and Internet Explorer, but Chrome did not exhibit these issues. If you’re nosey as to what my site looks like and the movie that I’m referring to, you can see it here. The movie shown there was provided by EA Sports’ PR rigid.
For a professional web site, these types of loading problems are not acceptable. For an inexperienced site, however, these drawbacks could be viewed as a minor–and temporary–setback while you ramp up operations.
At this point you might be feeling a little stuck. You have this superb, unique, off the hook movie that you want to share with the world, but you want them to view it on your site and not a hosting site. At the same time, you’re not at the point where you have the servers and the bandwidth to support 15-minute long movies without your audience having to wait ten minutes or more for the movie to buffer. Plus, you don’t want your web host company to charge exorbitant amounts because your fine movie content clogged up the tubes.
Fortunately, there are answers to this problem. One solution comes in the form of Amazon Web Services. Signing up is free and the cost to use their services are counted in pennies per GB. You only pay for the services you use as you use them. There are no monthly fees or subscriptions.
Amazon Web Services does not provide a step-by-step tutorial. However, there are slew of help files and information spread around the site. For the purposes of uploading movie, you need to use Amazon CloudFront in conjunction with an Amazon S3 bucket. From the Amazon CloudFront page:
To use Amazon CloudFront, you:
- Store the original versions of your files in an Amazon S3 bucket.
- Create a distribution to register that bucket with Amazon CloudFront through a ordinary API call.
- Use your distribution’s domain name in your web pages, media player, or application. When end users request an object using this domain name, they are automatically routed to the nearest edge location for high spectacle delivery of your content.
- Pay only for the data transfer and requests that you actually use.
We’ll tell you more about Amazon Web Services in the next article!