Easily Add Videos to Your WordPress Blogs
->
Video is one of the most popular mediums for broadcasting information online. There are dozens of high traffic video services online such as Daily Motion, Vimeo and MetaCafe. With over one billion active users every month, YouTube is far and away the most popular video website online.
In this tutorial, we will show you how you can add videos into your content. We will show you how to add videos to your website design and talk about some of the video plugins that are available for WordPress.
How to Add Videos to Your Website Design
Integrating a video directly into your website design is useful if you have an important video you want to show to all visitors. For example, an introduction video that explains what your company does. This could be placed in a prominent area such as your header, sidebar or footer.
To do this, you need to get the HTML embed code for the video you want to publish. The steps below show you how to acquire the HTML embed code from YouTube, however the process is similar on all video websites.
The first thing you need to do is locate the video that you want to display on your website.
Underneath the video you will see an information box with links such as About, Share, Add To, etc. Click on the “Share” tab and then click on “Embed”. This will highlight the HTML embed code for your video.
If you are adding a video to an area such as your sidebar or footer, you will probably need to reduce the width of the video. You can do this by clicking on the video size option underneath. A couple of preset sizes are available, however if you are reducing the width of your video, you should choose the custom size option so that a smaller width can be entered.
Once you are happy with the dimensions of the video, copy the embed code.
Next, you need to add your video embed code to the suitable theme template. Theme files are located in the www.yourdomain.com/wp-content/themes/THEMENAME/ folder. You can edit templates manually using the file manager through your hosting control panel or by overwriting the files using an FTP client. If you have made your themes writable, you can also modify them directly through your theme editor (located in the Appearance section of the WordPress admin area).
If your WordPress theme is widgetized, it may be more practical to integrate videos into your design using widgets. All you have to do is drag a text widget into a widget zone and paste the HTML embed code for your video. Then save the widget.
How to Manually Add Videos To Your Content
The HTML embed code for your video can also be pasted directly into your posts and pages. The text editor has to be chosen before pasting the code for the video to display correctly. If you paste the code into the visual editor, the HTML code itself will be published in your content (i.e. instead of the video).
If you plan on publishing videos regularly, it is worthwhile disabling the visual editor completely. There is an option to do this at the top of your profile page (www.yourwebsite.com/wp-admin/profile.php).
Since WordPress 2.9, you can embed videos into your content area by simply entering the URL of the video.
For example, entering:
http://www.youtube.com/watch?v=-K7aTPT56-Q
Would display:
Over twenty video services are supported by the WordPress embed feature including Twitter, PhotoBucket and blip.tv.
The embed shortcode allows you to change the size of videos directly within your post or page. All you have to do is place the video URL inside the embed shortcode. For example:
[ embed width="300" height="169"]http://www.youtube.com/watch?v=-K7aTPT56-Q[/embed ]
Would display:
How to Upload Videos to Your Website
Most website owners upload their videos to external video services such as YouTube. It is more practical to do this as you do not incur any bandwidth costs and you can also earn a little money from your uploaded videos. Uploading to a video website also allows other website owners to share your content easily; either via the video URL or by embedding your videos on their website.
However there are times when it is better to upload your videos directly to your WordPress website. Member websites, for example, normally keep their videos private. Additionally, people who want to share private videos with friends do not want always want to share their videos with the world as well.
Videos can be uploaded to your WordPress website in the same way that images and other media are. Simply click on the media button that is located above your post editor.
You can also upload new videos directly through the media section. The “Add New” link is located in your WordPress admin menu and at the top of your media library.
Next, click on the “Upload Files” tab tab in the media pop up. Then select the video file you want to upload and WordPress will start uploading the file to your website.
A title, caption and description can be added for each video you upload.
WordPress uses the video shortcode to embed uploaded videos. The shortcode will automatically be added to your post once you click on the media insert button. For example:
[ video mp4=”http://www.yourwebsite.com/wp-content/uploads/2015/01/sample_mpeg4.mp4″][/video ]
Additional parameters can be defined. For example, the code below defines the size of the video and will automatically play the video when a page is loaded.
[ video mp4=”http://www.yourwebsite.com/wp-content/uploads/2015/01/sample_mpeg4.mp4″ autoplay=”on” width=”500″ height=”350″][/video ]
The final output looks great. From a visitor’s point of view, there is no difference in whether your videos are hosted on your own website or on a video service such as YouTube.
One problem you may encounter when uploading videos to your own website using the media uploader is WordPress’s maximum upload file size limit. It is common for a WordPress website to have a maximum file upload file size of 8MB. Some hosting companies restrict this to only 2MB. The php.ini file has to be modified in order to increase this file limit. If you are unable to do this yourself, please contact your hosting company for assistance. Please note that many hosting companies do not allow their customers to increase the maximum upload file size limit.
Videos tend to have large file sizes. The overall file size depends on the length of the video, quality of the recording and its video format (MP4, AVI, MOV etc). Rather than upload videos through the WordPress media uploader, it is more practical to upload files to your website using an FTP client such as FileZilla. You could upload videos directly to one of your uploads folders or create a dedicated folder for videos on your website (e.g. www.yourwebsite.com/videos/). Then display the video on your website using the video shortcode.
WordPress Video Plugins
WordPress video plugins can usually be categorised as one of two types: Those that add functionality for hosting your own videos and those that add functionality for using external video services such as YouTube.
JW Player is a good example of a WordPress plugin that improves upon WordPress’s video functionality. It allows you display flash and HTML5 audio and video and has many advanced configuration options. Another good plugin is WordPress Video Player. The player can be styled however you like it and lets you organise videos as playlists.
A few years ago, plugins that allowed you to embed videos from websites such as YouTube were very popular. The need for using such a plugin was reduced once WordPress introduced its video embedding feature that allowed you to add videos to your content by simply inserting the URL. There are still some benefits to using a plugin instead of WordPress’s built in video embedding system. For example, YouTube embed plugin lets you define many YouTube related settings from the admin area. Such as automatically playing all of your videos and showing annotations by default. This removes the need for these settings to be defined on a video by video basis. If you want all external videos to be displayed in the same way, a plugin such as that may prove very useful.
Another interesting plugin is Automatic Youtube Video Posts Plugin. The plugin will automatically import videos from a channel or playlist and create posts for them.
WordPress is a great platform for publishing your own videos and videos of others. If the core version of WordPress cannot do what you want to do, check out the plugin directory at WordPress.org as there is sure to be a plugin that does.
We hope you have found this tutorial on adding videos to your WordPress website useful.
The post Easily Add Videos to Your WordPress Blogs appeared first on Theme Lab.
Written by - Visit WebsitePosted in Theme Labs