Archive for category: Tech

2012 Mac Pro “Update” and the Creative Professional

There was no mention of it on stage at the WWDC yesterday, but the Mac Pro has finally been updated after almost two years. There is a slight increase in the clock speeds available, and there doesn’t seem to be a dual quad-core option available anymore. The processors are still last-generation Bloomfield & Westmere-EP Xeons. Newer Sandy Bridge-EP processors were released in March, which as I understood it was the main reason Apple had to wait so long for an update, and why there should have been an update this week. The Sandy Bridge-EP processors start at 6 and go up to 8 cores! Other things that would have been reasonable to expect include updated graphics cards, USB 3.0, and Thunderbolt ports. Since FireWire is gone from the MacBook Pros, Thunderbolt & USB 3.0 are going to be available on a lot more drives in the near future and it would be great to have access to those ports on Mac Pros.

The Mac Pro is not exactly overpriced even with two-year-old technology. You would have a hard time putting together a computer with the same parts for much less money. But given the option, you would also be foolish to build that computer today. I happen to know that you can build a really great Sandy Bridge desktop computer for a lot less money because I did it last year with a Core i7-2600K-based system that cost me less than $1000 in parts. With the release of Ivy Bridge MacBooks you’ll soon be able to build your own Ivy Bridge desktops as well. I’ve been building hackintoshes since 2006, and it is much easier to set up now than it was in the early days. I’ve found that once the software is set up it’s as stable as any Mac Pro I’ve ever worked on and runs very fast.

But hackintoshes are only for individuals and small businesses willing to live on the edge. I’m teaching FCP editing classes at The New School this year, and they have hundreds of Mac Pros running FCP. I would be laughed out of the room if I suggested they replace those aging hulks (they are very heavy) with custom-built PCs hacked to run software that actively fights being installed on the computer. The lawyers might have something to say about it as well.

So what do you do as a creative professional who plays by the rules? You need power to run your fancy software. In my case I need flexibility. I need to monitor my video work on a video monitor. So I use a Blackmagic Intensity Pro PCIe card that costs less than $200 and does everything I need. I also have a nice computer monitor that I don’t want to replace every time I upgrade my computer. If you move up the chain a little, maybe you have a fibre channel network. Maybe you have an SDI video system that runs through your whole facility.

You could use iMacs. If you’re really dedicated to Macs and you want to upgrade now, the iMacs have Sandy Bridge processor options and better graphics cards than the Mac Pros. There also seems to be a number of 3rd party options for expanding your iMac using Thunderbolt. Similar to external hard drives, you can plug a box into your iMac’s Thunderbolt port and then plug a couple PCI cards into the box.

People are so clever!

That box is $979 though. Not exactly a bargain.

What I would recommend is looking at Windows. I know that makes a lot of people mad, but honestly as far as I’m concerned the only thing holding me back from Windows is all these HFS+ disks I have, and all the HFS+ disks I’ll work with in the future. I’m sure as hell not going to edit using MacDrive on Windows. I tried that once. After a couple years I’ll stop using FCP and both Avid & Premiere run great on Windows. FCP was the only reason I started using Mac OS in the first place. I like it. Snow Leopard is great. I also think Windows 7 is great. I’m not so sure about Windows 8 though. But I’m not so sure about Mountain Lion (or Lion). The rush to make the desktop more like mobile is not helping those of us who do fancy stuff on our computers.

In my New School classes I’ve spent much of the first class explaining to the students that things are changing very quickly and that many of the technical things they learn in the class will be obsolete soon. My advice is don’t get too comfortable in your workflows. And don’t buy a new Mac Pro. Your old one probably works fine.

Video Embed & Thumbnail Generator Plugin Version 2.0 Released

Closing a number of security holes and adding some nifty UI enhancements like an encoding progress bar and animation during thumbnail generation, this is an important update and is strongly recommended for anyone using the Video Embed & Thumbnail Generator plugin.

Big Update to My Video Embed & Thumbnail Generator WordPress Plugin

In January I made a plugin for WordPress that generates thumbnails for videos posted online, and the proper HTML & JavaScript codes to embed those videos in a webpage. It has come in handy many times when I want to show a work-in-progress to a client, post dailies, or just embed a video on my blog. Writing it really helped me get a handle on the whole HTML5 video thing, which in summary is a big ugly mess.

The first version was really crude because I couldn’t figure out how to hook in to the WordPress Media Library, but it worked well enough for my purposes. I always wanted to go back in and make it more user-friendly, so for the past few weeks I’ve been revising the plugin to tap in to the built-in uploading and media management systems. Big thanks to Andy Blackwell for posting his great tutorial on the very important attachment_fields_to_edit hook. I learned a lot more about the WordPress plugin system, and finally put the plugin in their directory, which forced me to learn a few things about SVN, which is a clever if initially baffling system.

Anyway, I highly recommend the new version of this plugin if you’re doing any video embedding on your WordPress site. You don’t need FFMPEG if you just want a good system for posting videos you have hosted on your site, but if you do have FFMPEG on your server, you’ll get thumbnail generating and automatic HTML5/iPhone-compatible file encoding. It’s pretty neat.

Printing on DVDs, CDs, and oh let’s be honest, you don’t use Blu-Ray

I’ve used Epson Artisan printers for the past six years to print attractive images on the DVDs I burn. I have terrible handwriting, and I think if you have the option you should make a good presentation. I got an Epson Stylus Photo R200 in 2004, and I upgraded to an R280 a couple years ago. I’ve purchased a few hundred Ritek RiData White Inkjet Hub Printable DVD-Rs and had great results both burning and printing on them. I always talk them up whenever I’m working at an office and I usually convince them to buy one, because nothing looks worse than Sharpie scrawl on a disc. It has always been dangerous to put a sticky label on a DVD. It can destabilize the disc, causing playback problems, and there is potential for the label to spin off and damage the player. I use clear slimline DVD cases so I don’t have to print a case insert. Most of my DVDs are temporary anyway, so I don’t worry about how they’ll work without a spine label on a shelf full of DVDs. Standard Blu-Ray cases are translucent and work great without a case insert. I think it’s important to put Blu-Ray discs in blue cases in order to avoid confusion. But of course I’ve had very little need to burn Blu-Ray discs, even though I bought a Blu-Ray burner hoping to get my clients really high-quality versions of their films. I’ve probably burned 5 discs in the past year. It definitely came in handy for screenings where you don’t want to pay a couple hundred bucks to make an HDCAM tape. The trouble is they can’t really be used for general use because you can’t count on the recipient having a Blu-Ray player.

Today I decided to purchase a multifunction printer so I could get a scanner, and maybe a fax too, for the five times a decade I need to fax something. I was pretty sure the only printers that do what I needed were the Epson Artisans, but the Staples salesman pointed me towards the Canon PIXMA MG5320, which scans and prints on discs for only $99! I thought I’d give it a shot. These things are basically disposable considering the ink refill costs, so it’s not a big deal if it turns out to be substandard. And faxing isn’t that important.

So far I’m very happy. The print quality is great, the scanner scans, and the disc printing tray seems to feed more confidently than the Epsons. The whole disc printing process was always a little dicey on the Epsons.

I don’t like to use the software that comes with the printer to print on discs because I like to be able to print straight from my design program of choice. Usually that’s Illustrator. For the Epsons I’ve always used Brian Nash’s excellent templates. I couldn’t find a similar one for the Canon PIXMA MG5320. I found an old one for some other Canon printer, but it wasn’t aligned for the current model. I revised it to line up with my printer, and I thought I’d upload it for anyone else who needs a template to print on discs with the MG5320.

Illustrator Template (PDF & AIT)

FCP X: What do we do now?

So at the moment, FCP X is pretty much a disaster. Lots of people are saying that it will get better, but for now I could never make a movie with it. That’s not being elitist or anything, it’s just a tool that I can’t use. Maybe it will get to a point where we can use FCP X, but for now I’m working under the assumption that FCP 7 is the end of the line for me.

Now, I just upgraded to FCP 7 a couple weeks before the release of FCP X, and I’m feeling pretty clever about that. But it also points out an important thing. We don’t always have to use top-of-the-line software to edit. I tend not to work under crazy deadlines, so things like 32-bit rendering and lack of multicore support are more minor annoyance than workflow killer. If I can bring videos files in, convert them to a nice codec, edit them, and then export in several different ways, including OMF, then I’m very happy.

So I’m not here to complain about FCP X. Maybe it will end up being awesome. At the moment I worry about little things like having to trick it into doing audio and video transitions separately but maybe the world is changing and I won’t be the cool kid who know how all the software works anymore. I’ll be using FCP 7 until it stops being useful to me then I’ll try something else. I want to explore the other options I’ve ignored for so long because FCP was so good.

First up is Avid. Avid has really stepped up its game in the past few years. They’ve put out a ton of releases, and most importantly for me, they’ve started limited support for 3rd party I/O hardware. Cost has always been my biggest problem with Avid. I know it works great, but I just don’t have the money for a $5,000 Mojo DX. I’m using a $200 Blackmagic Intensity Pro right now, and it does absolutely everything I need. Avid doesn’t support any Blackmagic cards, but the $450 Matrox MXO2 Mini they currently support is a fair deal. The great thing about Avid is DNxHD, which is just as wonderfully simple as ProRes, and it’s freely available, which will become important as we look at other options.

I experimented with Adobe Premiere back in college, and I couldn’t make heads or tails of it. It wasn’t quite as confusing as iMovie, but it immediately turned me off. In the meantime, Adobe has totally overhauled the program, and it is by many accounts a great program. I’ve always considered it a bit of a joke, but considering that it already comes with the Production Premium suite, a lot of places I work already own it. And it works with all the same hardware FCP does. I’m anxious to try a small project with it to see how things turn out. It seems like a poor-man’s FCP 7, but a very rich man’s FCP X. It’s written in modern code, and fully takes advantage of the power of our modern computers, but it also looks and feels like a regular editing program. What it doesn’t have is a ProRes or DNxHD. If you already have FCP on your computer, you can use ProRes, but that’s not something we can rely on indefinitely. It seems like DNxHD would be the best choice, since you’ve long been able to install Avid codecs on any computer separately from the Avid software.

The wild card I started thinking about this week is Lightworks. It has a long history, with long-time Scorsese editor Thelma Schoonmaker being the most prominent of the fancy-pants editors who use it. I talked with her assistant about it a couple years ago and he was actually using FCP to do a lot of supplemental work, because Lightworks was missing some of the fancy new HD features FCP could handle at the time. It was recently turned in to open source software, although the full source code hasn’t been released yet. The price of $0 is hard to beat. They plan to update it with a lot of the things that I would like to see in an editing software, including support for the fancy codecs I like so much. I’m going to download it and try it out soon, and I will report back on my impressions. At the moment it only runs on Windows, which is a big scary thing for some people, but I for one would welcome a return to Windows. The only reason I switched to Mac OS was for FCP, but with that out of the picture, all the major programs are available for either platform.

I think we’ve all learned a valuable lesson recently, that counting on a single company to supply all of our needs is foolish. I’ve even seen some rumblings online that Apple might abandon the Mac Pro. Without the expansion slots and huge processing power of the Mac Pro, you’re left with the future promise of Thunderbolt, which sounds pretty cool, but leaves out decades of legacy connectors only available through PCI Express slots, like Fiber, SCSI, SAS, etc. and we can’t all just go out and buy new storage solutions every couple years. What we can definitely be flexible about is software. Software is cheap, and the more of it we know, the better off we’ll be.

Making MP4 H.264 Videos in Apple Compressor

Unless there’s a specific need for something else, I almost exclusively encode web video using H.264 in an MP4 container. It looks great, and is the most widely compatible format I know. I started doing it mostly because Flash Video players support it without having to re-encode as FLV. Here are the settings I use in Compressor:

Do this on a full-quality “Current Settings” QuickTime movie already exported from Final Cut Pro. Don’t export directly to Compressor from FCP. This is a lot cleaner.

Start with the “QuickTime H.264″ preset in the Apple/Formats/QuickTime folder. It might seem wrong, but we’re not going to use the MPEG-4 “File Format” setting. We’ll be working in QuickTime Movie format since we get the most control over compression settings that way.

Drag the preset onto your video to apply it.

Change the Extension setting to mp4. Yes, it’s really that easy. You have to change it here though. You can’t just change your .mov filename to .mp4 after it’s encoded.

UPDATE  August 2012: I used to get invalid public atom errors when I renamed .mov H.264/AAC files to .mp4, but I just had a whole bunch of .mov files otherwise encoded with these settings that I needed to play in a Flash player. Sound played, but no picture. I didn’t have time to re-encode, so I tried just renaming the file and changing the extension to mp4. Picture now plays fine in the Flash player in Firefox, and QuickTime Player can open the files locally with no problem. The .mov extension wasn’t even an issue for the HTML5 player in Chrome.

Next, click on the Video “Settings…” button and use these settings:

You might need to change these based on your needs. I find the sweet spot for quality and file size lives between that Medium and High setting. Some streaming may require you to restrict the data rate. Multi-pass encoding hardly adds any time to the process (the 2nd pass is very quick) so I always leave it on.

Click OK, and move on to the Audio “Settings…” button. Switch the Format over to AAC and you should be fine.

If you have to be stingy with your bits, you can fiddle by going down to Mono or reducing the Target Bit Rate. I’m generally of the opinion that we shouldn’t be too stingy with our bits, so I don’t do that.

Hit OK and move on to Streaming. Change it to “Fast Start”

This lets your video start playing before the file finishes downloading. It’s not streaming, but progressive download; like YouTube. Don’t choose Fast Start – Compressed Header because that will prevent Flash players from taking advantage of the progressive download and won’t really help your file size much.

Frame Controls. Use them if you have the time. It really makes a difference in quality but definitely increases encode time. I usually just switch it on and leave it at the default settings unless I need to deinterlace or change the framerate. In this case I’m only really using the Better Resize Filter.

Finally, do whatever you need to in the Geometry tab to output the resolution you need. Keep the height an even number. Odd numbers freak out the H.264 codec. In this case 720×405 is closer to 16:9, but change it to 404 and everyone will be happier.

Save your custom preset and then submit. Make sure you set up a QuickCluster if you have more than two cores and you’ll get a real speed boost.

Files encoded this way work perfectly with my Video Embed & Thumbnail Generator WordPress Plugin.

The Thunderbolt Logo Looks Like Electricity

Apple just announced the Thunderbolt port on its new Macbook Pros. Thunderbolt is a dumb name, but so is Firewire if you think about it, which I never had before. And it’s better than its old Intel code name Light Peak, which was no longer accurate because the first generation of Thunderbolt cables don’t use optical technology.

This seems like a good thing. Firewire is slow. USB is slow. USB 3 hasn’t caught on, and nobody ever adopted the higher speed Firewire protocols. We needed something really fast to replace the ExpressCard slot we lost in 2009 when 15″ MacBook Pros switched to SD Card slots. And if this could replace expensive things like fiber and SAS and open up high speed data transfers to inexpensive peripherals I am all for it. I’m not sure it can, but why not try?

But seriously. This?

That is the standard symbol for electricity, or an electrical hazard. If I saw that on a computer I would think that’s where the power cord goes, and I would be sure not to stick my finger in it. And personally I would be confused because it looks like a DisplayPort (which it is too). Here is what you get when you search for “Electricity Sign” in Google Images:

Looks like electricity. Why use the exact same graphic for Thunderbolt rather than inventing a new graphic like USB & Firewire have? It’s unnecessarily confusing.

Video Embed & Thumbnail Generator WordPress Plugin

A plugin for the WordPress visual editor to make embedding videos, generating thumbnails, and encoding HTML5-compliant files a little bit easier.

Download from WordPress

Installation

  1. Upload the entire video-embed-thumbnail-generator folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Make sure you have all your MIME types configured correctly. Many servers don’t have .mp4, .m4v, .ogv configured, and even more don’t have .webm. There are a number of ways to do this. In your public_html directory you can edit your .htaccess file and add the following lines:
    AddType video/ogg .ogv
    AddType video/mp4 .mp4
    AddType video/mp4 .m4v
    AddType video/webm .webm

    Or use your web host’s configuration panel (cpanel, etc) to add a custom MIME type.

Just click the Add Media button to get started:

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 C:\)

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 another post.

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.

Once you’ve filled in all your options, click “Insert into Post” and you’ll get a shortcode in the visual editor like this

which translates to this:

519 views

To embed videos on other sites you can use an iframe 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>

If you want to further modify the way the video player works, you can add the following options inside the [KGVID] tag. These will override anything you‚’ve set in the plugin settings

  • poster=”http://www.example.com/image.jpg” sets the thumbnail.
  • width=”xxx”
  • height=”xxx”
  • align=”left/right/center”
  • inline=”true/false” allow other content on the same line as the video.
  • volume=”0.x” Pre-set 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.
  • loop=”true/false”
  • autoplay=”true/false”
  • watermark=”http://www.example.com/image.png” or “false” to disable.
  • title=”Video Title”
  • 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.
  • caption=”Caption”
  • description=”Description” Used for metadata only.

These options will only affect Video.js playback

  • skin=”example-css-class” Completely change the look of the video player. Instructions here.

These options will only affect Flash playback in Strobe Media Playback video elements. They will have no effect on HTML5 or Video.js playback.

  • endofvideooverlay=”http://www.example.com/end_image.jpg sets 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.

These options are available for video galleries (options work the same as standard WordPress image galleries)

  • 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_order=”ASC/DESC” sort order
  • gallery_id=”241″ post ID to display a gallery made up of videos associated with a different post

For example

[KGVID autohide="false" loop="true" autoplay="true" poster="http://www.kylegilman.net/wp-content/uploads/2011/10/Reel-11-10-10-web_thumb2.jpg" width="720" height="404" configuration="http://www.example.com/config.xml"]http://www.kylegilman.net/wp-content/uploads/2006/09/Reel-2012-05-15-h264.mp4[/KGVID]

 

If you’re getting some use out of this plugin, please consider donating a few dollars to support its future development.

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.

FAQ:

Why doesn’t my video play?

Most of the time your video doesn’t play because it’s not encoded in the right format. Videos have containers like mp4, mov, ogv, mkv, flv, etc and within those containers there are video and audio codecs like H.264, MPEG-4, VP8, etc. The best option for this plugin is an mp4 container with H.264 video and AAC audio. mp4s with MPEG-4 video will not play in the Flash player, and if you don’t use AAC audio you won’t get any audio.

If you recorded the video using a Samsung Galaxy S II phone, even though most programs will tell you it’s H.264 video with AAC audio, there’s a good chance that it’s actually recorded in 3gp4 format, which won’t work with the Flash player. Use MediaInfo Library to get really detailed information about your media files.

The Strobe Media Playback Flash player will not play mp4/m4v/mov files that don’t have the MooV atom at the head of the file. FFMPEG puts the moov atom at the end of the file, so this can be a problem. The plugin will fix this problem on newly encoded H.264 videos if you have qt-faststart or MP4Box installed on your server.

Why doesn’t this work with YouTube?

WordPress already has a built-in system for embedding videos from YouTube, Vimeo, Dailymotion, etc. Just put the URL into your post and WordPress will automatically convert it to an embedded video using oEmbed. You don’t need this plugin to do that. If you’re trying to generate new thumbnails from YouTube videos, I’m not going to risk Google’s wrath by providing that functionality. I’m not even sure I could figure out how to do it anyway.

If you just want to change the skin or thumbnail of a YouTube video, use JW Player.

I’m getting an error message “FFMPEG not found at /usr/local/bin/. You can embed existing videos, but video thumbnail generation and Mobile/HTML5 video encoding is not possible without FFMPEG.”

First off, don’t panic.

This plugin can use FFMPEG or LIBAV to make thumbnails and create alternate video formats compatible with HTML5 videos players. Unfortunately most servers don’t have FFMPEG installed and most shared hosting plans don’t allow you to install FFMPEG because of the system resources it requires. You’re getting this error message because you don’t have FFMPEG installed in the most common directory. If you know you have FFMPEG installed on your server, you’ll need to find the actual path to the program and enter it in the plugin settings field ”Path to applications on server.”

Many of the features of the plugin will work without FFMPEG. You can generate embed shortcodes for your videos on any host because that part of the plugin is JavaScript running in your browser. But without FFMPEG you won’t be able to generate thumbnails or encode alternate formats on the server. There is no way around this. A program has to read the video files in order to generate the thumbnails, and FFMPEG is the best one I’ve found to do that. Dreamhost is one of the few shared hosts I know of that has FFMPEG installed and available for users.

How can I encode videos in directories protected by .htaccess passwords?

Use the “Embed from URL” tab. Use the format http://username:password@yourdomain.com/uploads/2012/01/awesomevid.mp4 in the Video URL field.

Version history:

4.1.1 – May 21, 2013

  • Removed second argument from json_encode() which caused video setup & resizing features to fail when servers were running PHP 5.2.

4.1 – May 19, 2013

  • Updated Video.js to version 4.0 and created a new skin that approximates the old one. Older versions of Video.js had some security holes, so this update is highly recommended.
  • Significantly reduced inline JavaScript generated by the plugin.
  • Fixed bug that disabled Strobe Media Playback player and caused “TypeError: Error #1034″ messages, particularly in Internet Explorer.
  • Fixed bug that caused view count to be replaced by complete views when the end of the video is reached.
  • Fixed bug that disabled video encode status monitoring in media modal popup when the same video was already in the post edit window.
  • Fixed missing “document.” in JavaScript when choosing thumbnails which prevented some users from properly selecting and saving generated thumbnails.
  • Fixed bug that displayed WordPress thumbnail-sized poster image if no poster URL was in shortcode.
  • Tweaked video resize method to support more kinds of themes.
  • Added ability to turn off watermark on individual videos by entering watermark="false"in the shortcode.
  • Added option to disable embedding on other websites.
  • Added option to allow videos to be placed next to each other on the page.
  • Added support for AAC library libfdk_aac.
  • Adjusted embedded video and gallery CSS to account for colored backgrounds.
  • Renamed “Poster image” plugin setting to “Default thumbnail”
  • Removed post meta box below post editing window until I can work out a way to generate them without disabling video encode status monitoring in media modal popup when the same video is already in the post edit window.
  • Replaced deprecated ereg PHP function with preg_match and used a more precise regular expression when determining the height and width of videos.

4.0.3 – May 01, 2013

  • Fixed bug that caused video control text to display below videos on iPhones.
  • Changed method for saving video plays to the database. Now more secure and accurate.

4.0.2 – April 25, 2013

  • Plugin settings are no longer re-saved to the database on every page load. Should speed things up a little.
  • Changed CSS to discourage theme styles from overriding embed code overlay styles.

4.0.1 – April 23, 2013

  • Added options to display video title and embed code overlays on video player, and captions and view counts below videos.
  • Added option to filter your theme’s video attachment page template to display the video instead of WordPress’s default behavior of just showing the title of the video. For backwards compatibility retained old method of completely replacing the video attachment template with a video player.
  • Redesigned settings page to save using AJAX, and added a sample video player so changes are seen immediately.
  • Added iframe method to embed your videos on other websites.
  • Additional video formats encoded by the plugin are now added to the WordPress database as video attachments. To avoid a Russian nesting doll scenario these child attachments do not have the fields for creating thumbnails and encoding additional formats.
  • Changed encoded H.264 extensions from .m4v to .mp4 to increase compatibility with WordPress 3.6′s new video capabilities. Existing M4V files will still work.
  • Checks only one time for alternate video sources when videos are embedded from other servers. This should speed up page load times considerably.
  • Added ability to rotate and replace the original file for videos recorded vertically on cell phones.
  • Added post meta box to posts with embedded videos that lists alternate formats found for each video.
  • Added option to set a post’s featured image to the most recently generated thumbnail, and a button to set all previously generated thumbnails as featured images.
  • Added option to save generated thumbnails as children of either the video or the post the video is attached to, and a button to convert all thumbnails to the chosen hierarchy.
  • Added option to delete associated thumbnails and additional encoded video formats when original video attachment is deleted.
  • Added backwards compatibility for WordPress versions 3.2 and above.
  • If Strobe Media Playback player is selected, the Video.js player is used in situations where Flash doesn’t work (webm, ogg playback) instead of the ugly default browser players.
  • Added watermark, view counts, volume attribute, and Google Analytics event tracking when using Strobe Media Playback player.
  • Added alignment option to center or right-justify videos.
  • Revised video player setup to properly resize the player if the containing DIV is smaller than the video, and resize again if the window size changes (or orientation changes on Android).
  • No matter which player is selected, iOS now displays the built-in controls so AirPlay works.
  • Added schema.org videoobject markup for improved SEO.
  • Fixed FLV embedding with Video.js player and improved selection of embedded formats for Strobe Media Playback.
  • Adjusted video gallery CSS and added a play button overlay to gallery thumbnails.
  • Adjusted watermark and Video.js play button CSS so the overlays don’t overwhelm small videos.
  • Set Video.js controls to fade out on autoplay and on iOS, without having to mouseover the video.
  • Fixed endless “loading” spinner shown at the end of videos in some browsers in Video.js player.
  • Clicking “Insert into post” immediately after upload without changing any options now inserts shortcode instead of just the title of the video.
  • Inserting shortcode without a thumbnail no longer attempts to save the nonexistent thumbnail. Thumbnail cleanup is handled better.
  • Fixed error message “array_key_exists() expects parameter 2 to be array” when shortcode didn’t have attributes.
  • Escaped all shell commands for increased security.
  • Fixed bug that made “Encode” button disappear if all formats were checked.
  • Fixed missing argument for kgvid_clear_completed_queue() when scheduling cleanup.

4.0 – April 22, 2013

  • Accidental release caused by programmer’s incompetence.

3.1.1 – March 5, 2013

  • Fixed missing ) in uninstall.php

3.1 – January 30, 2013

  • Added video watermark overlay option. (Video.js only)
  • Changed front-end CSS file name to kgvid_styles.css and made it always available, not just when galleries are on the page.
  • Removed my watermark testing logo which was accidentally inserted above videos in version 3.0.3.
  • Added option to choose -b:v or legacy -b flags when encoding. Recent FFMPEG versions only accept -b:v.
  • Added automatic encode queue cleanup. Any completed entry older than a week will be removed.
  • Added deactivation hook to remove queue and scheduled queue cleanup on deactivation.
  • Added uninstall.php to remove settings from the database on uninstall.
  • Disabled “Delete Permanently” link while encoding is canceling.
  • Checked for escapeshellcmd. If it’s disabled on the server, encoding can’t start.
  • Fixed insert title and download link checkboxes. They will actually insert something now.
  • Changed method for determining if a video has been played or paused and played again, for counting purposes.
  • Fixed check for mime type when generating H.264 video encode checkboxes to avoid showing options for QuickTime files that are higher resolution than the original video.

3.0.3 – January 29, 2013

  • Fixed bug that added a blank line to JavaScript embedded in the page if “volume” wasn’t set in the short code (Video.js only).
  • If video player is set larger than the containing DIV and the player size is reduced to fit, the height is now rounded to the nearest integer.

3.0.2 – January 24, 2013

  • Fixed bug that permanently disabled buttons on the Embed Video from URL tab.
  • Disabled “Delete Permanently” option for encoded files found on other servers.
  • Reduced the jQuery UI Dialog css and put it in its own scope to avoid conflicts with existing jQuery UI Dialog themes.
  • Cleaned out some leftover code.

3.0.1 – January 24, 2013

  • Fixed bug that inserted empty options into gallery shortcodes.

3.0 – January 23, 2013

  • Updated to provide compatibility with several media changes in WordPress 3.5. With this version, thumbnail generating & video encoding will only work in WordPress 3.5 and above.
  • Added popup video gallery.
  • Changed shortcode tag to [KGVID]. Retained [FMP] for backwards compatibility.
  • Added Video.js player option. Older Strobe Media Playback Flash player is still included for backwards compatibility, but Video.js is highly recommended.
  • Added video play counting which is recorded to the WordPress database (Video.js only).
  • Added Google Analytics event tracking for video plays (Video.js only)
  • Added ability to encode multiple H.264 video resolutions.
  • Added video encoding queue.
  • Added qt-faststart and MP4Box processing to MP4/M4V H.264 videos encoded by the plugin to allow playback of videos as they download.
  • Added option to change default number of thumbnails generated by the plugin.
  • Changed any https FFMPEG input to http.
  • Thumbnail images are now added to the WordPress database as soon as they are selected.
  • Added option to use LIBAV instead of FFMPEG for thumbnail generating and video encoding.
  • Added wmode parameter to fix Chrome z-index issue. (Strobe Media Playback only)
  • Improved swfobject.js script enqueuing method to prevent conflicts (Strobe Media Playback only)
  • Rewrote plugin settings to work with the WordPress plugin settings API.
  • Removed dropdown list for embedding alternate encoded formats of video. All formats are made available to the player and the browser chooses best compatible format.
  • Removed mdetect.php and removed forced downgrading of quality when on mobile devices. Mobile browsers now automatically choose best compatible format.

2.0.6 – April 27, 2012

  • Removed swfobject.js from the plugin package. Now using the one included with WordPress. WordPress 3.3.2 contains a security fix for swfobject.js and the plugin will use the fixed version if you have upgraded WordPress (which is highly recommended).
  • Added setting to customize the formatting of titles inserted by the plugin.
  • Added settings to display a custom image when videos end instead of the first frame of the video (Flash only).
  • Fixed problem with embedded FLV files giving message “Argument Error – Invalid parameter passed to method” when loading poster images.

2.0.5 – April 20, 2012

  • Fixed “Wrong datatype for second argument” error on line 339 and subsequent automatic replacement of original videos with Mobile/H.264 versions whether they exist or not.

2.0.4 – April 19, 2012

  • Once again changed the process checking for FFMPEG installations. Should be universal now.
  • Added setting to turn on vpre flags for users with installed versions of FFMPEG old enough that libx264 requires vpre flags to operate.
  • Added setting to replace the video attachment template with a page containing only the code necessary to display the video. Makes embedding your hosted videos on other sites easier.
  • Fixed progress bar for older versions of FFMPEG.
  • Added Flash fallback when OGV or WEBM videos are embedded.
  • Removed restriction on number of thumbnails that can be generated at once and added a cancel button while generating thumbnails.

2.0.3 – February 24, 2012

  • When working with file formats that can’t be embedded (WMV, AVI, etc) the option to embed the original file will be disabled if Mobile/H.264, WEBM, or OGV files are found.
  • Changed encoding bitrate flag back to -b instead of -b:v to retain compatibility with older versions of FFMPEG.
  • Cosmetic changes in encoding progress bar.
  • No longer deleting encoded files if progress can’t be properly established.
  • Added “nice” to the encode commond (not on Windows) to prevent FFMPEG from overusing system resources.

2.0.2 – February 21, 2012

  • Fixed check for FFMPEG to work with Windows.

2.0.1 – February 21, 2012

  • Fixed check for FFMPEG again. Should be more universal.

2.0 – February 20, 2012

  • Large rewrite to fix several security issues. Full server paths are no longer exposed in the Media Upload form, all AJAX calls are handled through wp_ajax, and nonces are checked.
  • Added video encoding progress bar on Linux servers.
  • Added button to cancel encoding.
  • Added option to encode 720p or 1080p H.264 videos.
  • Changed requirements for AAC encoding. Will work with libfaac or libvo-aacenc.
  • Improved error reporting to help diagnose problems.
  • Videos recorded on phones in portrait mode (tall and skinny) will not end up sideways if FFMPEG version .10 or later is installed.
  • Thumbnail generation process uses fancy jQuery animation.
  • Fixed check for FFMPEG. Should actually work in Windows now.
  • Fixed unenclosed generate, embed, submit, delete strings in kg_call_ffmpeg

1.1 – January 8, 2012

  • Includes Strobe Media Playback files so Flash Player is now hosted locally, which allows skinning.
  • Added skin with new, more modern looking play button. Upgraders should check the plugin settings for more details.
  • Fixed “Insert into Post” button in “Embed from URL” tab when editor is in HTML view mode. Used to do nothing! Now does something.
  • Added option to override default Mobile/HTML5 encode formats for each video
  • Added check for FFMPEG. Generate & Encode buttons are disabled if FFMPEG isn’t found.

1.0.6 – November 6, 2011

  • Resetting to defaults on the plugin settings page resets to actual values now, instead of undefined constants.

1.0.5 – November 6, 2011

  • Fixed “Embed from URL” thumbnail creation. Generated thumbnails don’t disappear anymore.

1.0.4 – November 4, 2011

  • More thorough check made for existing attachments before registering poster images with the WordPress Media Library. Avoids registering duplicates or medium/small/thumb image sizes if they’re used as poster image.
  • Added loop, autoplay, and controls options to HTML5 video elements.
  • When saving attachments, won’t try to delete thumb_tmp directory if it doesn’t exist.

1.0.3 – October 27, 2011

  • Revised thumbnail cleanup to make sure temp files aren’t deleted when generating thumbnails for more than one video at a time.

1.0.2 – October 21, 2011

  • Fixed a shocking number of unenclosed stings in get_options() calls. Bad programming. Didn’t affect functionality, but will stop generating errors.
  • Removed clumsy check for FFMPEG running. Was preventing encoding if ANY user on the server was running FFMPEG. Be wary of overusing your system resources though.

1.0.1 – October 21, 2011

  • Quick fix to add mdetect.php to the plugin package from WordPress

1.0 – October 20, 2011

  • Huge re-write.
  • Integrated with WordPress Media Library and added WEBM support.
  • Increased control over thumbnail generation.
  • Added tab to Insert Video dialog box for adding by URL (like the old version).

0.2.1 – October 9, 2011

  • Check made to ensure iPhone/iPod/Android compatible encode video height is an even number when HTML5 video encodes are made.

0.2 – January 18, 2011

  • First Release

Back it Up!

My soccer coach always said Expect The Unexpected. I swear to God he also once said there is no “me” in team.

In general, hard drives don’t fail during the first few years of their lives. As long as they stay under normal operating conditions they’re pretty reliable. But they’re also delicate and fragile machines spinning around at intense speeds. Stuff goes wrong. So if your masters are data based and not tape or film, you better be prepared.

Last night I came home with the first dailies from a new movie on a portable hard drive from Glyph. I’ve had great experiences with their drives. I like the little leather cases on the Portagigs and I love the standard power cables on the fullsize ones. But last night when I tried to copy the dailies to my editing drive, on ten of the files, I consistently got a -36 error, unable to read or write to the disk. I got a little worried, but I wasn’t extremely concerned because I had a backup.

Whenever I work on a movie shot on cards (which is pretty much all of them now) I always insist on transferring to at least two drives. Sometimes I do three. Drives are cheap. Re-shooting a whole day is not. This morning I went back to set and copied the files from the backup drive to the one I had brought home. It worked fine. Notice I didn’t have the backup with me. Another important step is to physically separate your backups. If you drop your bag in front of a subway train, all that backing up won’t matter.

Canon 5D 24p!

A day I thought would never come. 23.98 & 29.97 shooting in the Canon 5D. This camera is the greatest!