Generates thumbnails, HTML5-compliant videos, and embed codes for locally hosted videos. Requires FFMPEG or LIBAV for thumbnails and encodes.
The plugin adds several fields to any video uploaded to the WordPress Media Library. Just choose a few options and click Insert into Post and you'll get a shortcode in the post editor that will embed a flexible, responsive HTML5/Flash video player with a preview image.
You have the option to use either the lightweight, flexible Video.js HTML5 player or Adobe's Strobe Media Playback Flash player. The HTML5 player is styled the same in all browsers and is easily customizable. The Strobe Media Playback option will default to a Flash video player if you're using a Flash-compatible file (flv, f4v, mp4, mov, or m4v). Otherwise it will use the Video.js player as a fallback. No matter which player you use, the video will resize on the fly to fit the container it's in.
You can also use the plugin to create a popup video gallery. The shortcode uses options similar to the WordPress image gallery shortcode. In its simplest form use the code
[KGVID gallery="true"][/KGVID] to create a gallery of all videos attached to the post. Thumbnail size and video popup size can be set on the plugin settings page.
If you have them installed on your server, the plugin can use FFMPEG or LIBAV to generate thumbnails and encode HTML5/mobile videos. By default the plugin looks for FFMPEG in
/usr/local/bin but if the application is installed in a different place on your server, you can point it to the correct place in the plugin settings. Users running WordPress on Windows servers should try using Linux-style paths (with forward slashes instead of backslashes and a forward slash
/ instead of
If FFMPEG or LIBAV is set up correctly, you can generate thumbnails using either the "Generate" or "Randomize" buttons. The "Generate" button will always generate thumbnails from the same frames of your video, evenly spaced. If you don't like them you can randomize the results with the "Randomize" button. If you want to see the first frame of the video, check the "Force 1st Frame Thumbnail" button. If you want really fine control you can enter timecode in the "Thumbnail Timecode" field. Use
mm:ss format. If you want even more control you can use decimals to approximate frames. For example,
23.5 will generate a thumbnail halfway between the 23rd and 24th seconds in the video.
02:23.25 would be one quarter of the way between the 143rd and 144th seconds. You can generate as many or as few as you need (up to 99 at a time). The unused thumbnails will be deleted after you click "Insert into Post" or "Save Changes."
In the plugin settings you can set the default maximum width and height based on the dimensions of your particular template and those values will be filled in when you open the window. If you generate thumbnails, the video display dimensions will be adjusted automatically to match the size and aspect ratio of the video file. You can make further adjustments if you want. After you choose a thumbnail it will be registered in the WordPress Media Library and added to the post's attachments.
I highly recommend starting with H.264 video and AAC audio in an MP4 container. If you're encoding with Apple's Compressor, the "Streaming" setting should be "Fast Start" (NOT Fast Start - Compressed Header). I've written up my recommended video encode settings in a post on my website.
If you have FFMPEG or LIBAV and the proper libraries installed, you can choose to encode your uploaded video into as many as five additional formats depending on your original source. 1080p, 720p, or up to 480p H.264, WEBM, and OGV. Different browsers have different playback capabilities. Most desktop browsers can play H.264, and all modern mobile devices can play at least 480p H.264. If you create multiple H.264 resolutions, the highest resolution supported by the device will be served up automatically. The plugin will not upconvert your video, so if you upload a 720p video, it will not waste your time creating a 1080p version. There was a time when it seemed like a good idea to provide OGV or WEBM for some desktop browsers, but even Firefox is planning to allow H.264 playback in the future and I no longer recommend encoding OGV or WEBM unless you expect a large number of no-Flash sticklers visiting your site. However, your mileage may vary.
The files will encode in the background and will take several minutes to complete, depending on your server setup and the length and size of your video. The plugin adds a Video Encode Queue menu to the Tools menu. You will see encoding progress, the option to cancel an encoding job, and you should get an error message if something goes wrong. Users on Windows servers may get inconsistent results with the encoding queue.
Encoded H.264 files will be fixed for streaming using qt-faststart or MP4Box if you have one of them installed in the same directory as your encoder and select it in the plugin settings. Without one of these applications, FFMPEG & LIBAV will place moov atoms at the end of H.264 encoded files, which forces the entire file to download before playback can start and prevents the Strobe Media player from playing them at all.
If you want to make ogv, webm, or H.264 files available and can't use the FFMPEG encode button, you can upload your own files to the same directory as the original and the plugin will automatically find them. For example, if your main file is awesomevid.mp4, the plugin will look for awesomevid-1080.mp4, awesomevid-720.mp4, awesomevid-480.mp4 (up to 480p H.264), awesomevid.webm and awesomevid.ogv as well.
If you want to make it easier for people to save the video to their computers, you can choose to include a link by checking the "Generate Download Link Below Video" button.
Sometimes for various reasons you might need to embed video files that are not saved in the WordPress Media Library. Maybe your file is too large to upload through the media upload form (if it is, I suggest the excellent "Add From Server" plugin), or maybe it's hosted on another server. Either way, you can use the tab "Embed Video From URL" in the Add Media window. Just enter the Video URL manually, and all other steps are the same as the Media Library options. The plugin will look for alternate encoded files in the same directory as the original, but this takes a long time when the video is on another server so it will only check for them once. If you add additional formats you can click the "Re-scan External Server" button in the meta box below the post you've embedded the video in to check again.
To embed videos on other sites you can use code like this.
<iframe src='http://www.kylegilman.net/?attachment_id=1906&kgvid_video_embed[enable]=true' frameborder='0' scrolling='no' width='640' height='360'></iframe>
[KGVID poster="http://www.kylegilman.net/wp-content/uploads/2011/10/Reel-11-10-10-web_thumb2.jpg" width="720" height="404"]http://www.kylegilman.net/wp-content/uploads/2011/10/Reel-11-10-10-web.mp4[/KGVID]
poster="http://www.example.com/image.jpg"sets the thumbnail.
inline="true/false"allow other content on the same line as the video
volume="0.x"pre-sets the volume for unusually loud videos. Value between 0 and 1.
controlbar="docked/floating/none"sets the controlbar position. Video.js only responds to the "none" option.
embedcode="html code"changes text displayed in the embed code overlay in order to provide a custom method for embedding a video.
view_count="true/false"turns the view count on or off.
description="Description"Used for metadata only.
skin="example-css-class"Completely change the look of the video player. Instructions here.
endofvideooverlay="http://www.example.com/end_image.jpgsets the image shown when the video ends.
autohide="true/false"specify whether to autohide the control bar after a few seconds.
playbutton="true/false"turns the big play button overlay in the middle of the video on or off.
streamtype="live/recorded/DVR"I honestly don't know what this is for.
scalemode="letterbox/none/stretch/zoom"If the video display size isn’t the same as the video file, this determines how the video will be scaled.
backgroundcolor="#rrggbb"set the background color to whatever hex code you want.
configuration="http://www.example.com/config.xml"Lets you specify all these flashvars in an XML file.
skin="http://www.example.com/skin.xml"Completely change the look of the video player. Instructions here.
gallery="true"turns on the gallery
gallery_thumb="xxx"width in pixels to display gallery thumbnails
gallery_exclude="15"comma separated video attachment IDs. Excludes the videos from the gallery.
gallery_include="65"comma separated video attachment IDs. Includes only these videos in the gallery. Please note that include and exclude cannot be used together.
gallery_orderby="menu_order/title/post_date/rand/ID"criteria for sorting the gallery
gallery_id="241"post ID to display a gallery made up of videos associated with a different post
I'm not really a software developer. I'm just a film editor with some time on his hands who wanted to post video for clients and wasn't happy with the current state of any available software. But I want to really make this thing work, so please help me out by posting your feedback in the comments.
Requires: 3.2 or higher
Compatible up to: 3.6
Last Updated: 2013-5-25
9 of 19 support threads in the last two months have been resolved.
Got something to say? Need help?