QuickTime Embedding Plugin

I got tired of my XML-RPC posts with QuickTime movies messing up the design of my blog. WordPress automatically adds paragraph breaks embed and object tags. This plugin corrects that behavior and doesn’t require the user to know how to create those tags. Additionally, starting with version 1.3b, this plugin uses JavaScript to get around the ActiveX alert on Windows versions of IE.

Download the Plugin

To install, download and extract the zip file. Upload the two files to your WordPress plugins folder (not including the directory). Once it is there, you can activate it from the WP administration pages.

After it is installed, you can us the following syntax to embed a QuickTime movie in a post:

[QUICKTIME http://www.xxxx.com/quicktime.mov 320 257]
or to use a poster frame or movie (in version 1.1b and above):
[QUICKTIME http://x.com/quicktime.mov http://x.com/poster.mov 320 257]

Always start with a bracket “[” followed by “QUICKTIME” then the path to the file, the width and the height. End with a closing bracket “]”.

A couple of notes about “poster frames/movies”: It should be the case that you can just use a jpeg or other image file as a poster movie as QuickTime can handle those formats. Unfortunately, this confuses several browsers so it is best to stick with using a movie as a poster movie.
Here is the one that I have started to use Here is a page that you can see it in action on.
To create your own, create a JPEG or GIF or PNG file and open it up with QuickTime Pro and “Save As” a “Self Contained Movie”.

One other thing to be conscious of regarding poster movies is that WordPress may be confused by them and not put the appropriate “enclosure” in your RSS feed for applications like FireAnt. This may or may not be a problem but is worth being aware of.

Starting with version 1.2b, I have implemented the ability to specify whether or not the video should auto start/autoplay and/or have a controller. To use these two options you would form the tag as follows:
[QUICKTIME http://x.com/quicktime.mov 320 257 true false]

The first “true” or “false” value is whether or not it should auto play and the second is whether or not a controller should be visible.

One thing that you should note is that it doesn’t really make sense to use a poster movie with movies that don’t auto play and it doesn’t really make sense to not have a controller for movies that don’t auto play.

If you like this script or are having problems with it, let me know, leave a comment below.

Of course, updates and additions to the script are appreciated. If you are interested, I use it at: MobVCasting and Open Vlog.

Last, if you are looking for a similar solution that will work with Flash and Windows Media as well as QuickTime and not only WordPress but Blogger and other places, check out Enric’s videos Playing In Place

You might also be interested in the latest tool that I have been working on for WordPress, a video commenting plugin

Last, here is a new version (actually, not a version of this but a complete rewrite with different capabilities, meaning don’t remove this plugin when you install the new one, your original videos will probably stop working): New QuickTime Audio/Video Posting Plugin for WordPress

Join the Conversation

168 Comments

  1. This plugin isn’t setup to work with comments only with main posts.

    Having said that, you should be able to make it work with comments if you really want to by adding the following line at the end of the script:
    add_filter(‘comment_text’, ‘quicktime_post’); // Add this right below: add_filter(‘the_content’, ‘quicktime_post’);

  2. Yeah.. The QuickTime plugin needs 16 or 17 pixels added to the height of the video to display the control bar correctly. A video with a height of 240 should use 256 or 257 with this plugin.

  3. All right, nevermind, jumped the gun there. I figured out my problem.

    One more question however, can this work with QT podcasts as well? I suppose the question would be in the height and width?

    Thanks.

  4. This is a great plugin but I would like be able to use poster frames as well. Any possiblity we can get this feature added to the script?

  5. Hey Trey,

    Good idea.. Just uploaded a new version with support for poster movies/frames/images whatever.. Works much better on blogs with lots of video.

    -shawn

  6. Hi Trey,

    Thanks for the great plugin, its very useful. I do have one question though. Would it be possible to specify a size for the thumbnail/poster frame. Right now Im using thumbnails that are 159×119. If I use: [QUICKTIME http://x.com/quicktime.mov http://x.com/poster.mov 320 240], it will scale my thumbnail to 320×240. Is there a way to remedy this? Thanks again!!

    -Steve

  7. Steve, Did you modify the code to do that? If so, would you mind sharing it back and I will include it in the official distribution of the plugin?
    -shawn

  8. Esli Vy chitaete eto soobshenie znachit vasha gostevaya, forum ili blog popali v spamerskii spisok rassylok. Chtoby udalit’ svoi resurs iz etogo spiska prishlite ego url na email: antyspam@bk.ru Eto v vashih zhe interesah. Vse eshe mozhno popravit’. Nam nuzhny tol’ko zabroshennye resursy. Esli vash eshe razvivaetsya – my ostavim ego v pokoe.

  9. is there a way to stipulate if the quicktime should automaticly play when the page is loaded or not?
    thanks,
    plugin is working great

  10. Thanks for this plugin, it really saves me the headache of inserting Quicktime into blog entries. I modified your plugin a little to suit my needs, they are:
    – Changed the [QUICKTIME] to [QT] because I’m lazy :p
    – Added a 3rd optional argument after poster argument, which will generate an “iPod version” link under the Quicktime video. The modified script will also detect the filesize and output that, very convenient for sites that support vodcast IMO

    I’m thinking you might want to consider adding this optional argument to the next version, though the filesize detection I’m using needs self-configured path on server, or maybe that’s easier way or just drop filesize detection altogether.

    Overall, this plugin works very nicely, props for your effort! One of the few things you can improve this plugin right now is probably making the code XHTML compliant, which can be a real pain I know. :p

    btw, for those who are still wondering if they should use Quicktime video on their blogs, my advice is H.264 is the best codec right now for minimum filesize and maximum quality.

  11. Hi Eyn,

    Thanks for this.. Couple of questions:

    The iPod version link, is that just a straight link to download the video file?

    The file size detection, is that for the RSS feed with enclosures? Doesn’t WordPress do that automatically?

    Yeah.. I should make the plugin output XHTML compliant. I am also thinking about other options for the embed and object tags. One in particular that people have asked for is auto-start.

  12. I did a little mod to this to stop the activex popup warning, but it involves adding a second file into the system, “writecontrol.js”, which has a single line in it “document.write(theCtrl);”

    edit the code at the bottom of the quicktimepost.php file, replace the following


    add_filter(‘the_content’, ‘quicktime_post’);
    ?>

    and replace it with


    ?>
    ‘;
    //–>

    ——-

    works great, i do not get any of the activex popup messages now in ie

    Steven Dowd

  13. Thanks Steven,

    I just updated the plugin to use a similar method. This new version 1.3b uses JavaScript to embed the player and gets around the ActiveX alert.

    -shawn

  14. I was having some trouble getting you plugin to work on my site. It simply wasn’t showing up at all. I took a look at your code and made one change to it. In the line where it locates the .js file I had to add a “/blog” in front of the /wp-content part. It appears that it grabs the site URL, not the blog install install URL in the first portion of that command.

    Thanks for creating this terrific plugin!

  15. Hey Rob,

    Thanks for writing.. I see the issue. Your WordPress install is in a different location than your actual blog content. I will change the plugin so it respects the different URLs. Thanks for pointing that out.

    -shawn

  16. Shawn,

    please disregard the above post. I was linking you in my vlog and somehow it put it in here….that’s very bizzare. But at least it’s an example of your efforts at work.

    Well thanks for the plugin, its awesome. I have one question – how do I insert my JPG on top of the movie before it starts? I’m not sure of the technical name of it, but I have a ‘splash screen” that I would like to show until the user presses play.

    once again, awesome job,
    Ken

  17. The easiest way is to turn your jpg into a “poster movie”:

    [QUICKTIME http://x.com/quicktime.mov http://x.com/poster.mov 320 257]

    Always start with a bracket “[” followed by “QUICKTIME” then the path to the file, the width and the height. End with a closing bracket “]”.

    A couple of notes about “poster movies”: It should be the case that you can just use a jpeg or other image file as a poster movie as QuickTime can handle those formats. Unfortunately, this confuses several browsers so it is best to stick with using a movie as a poster movie. To create your own, create a JPEG or GIF or PNG file and open it up with QuickTime Pro and “Save As” a “Self Contained Movie”.

    One other thing to be conscious of regarding poster movies is that WordPress may be confused by them and not put the appropriate “enclosure” in your RSS feed for applications like FireAnt. This may or may not be a problem but is worth being aware of.

    I am working on a way to do this with JavaScript which should fix the issues regarding WordPress and feeds as well as make it work without having to make a reference movie first.

  18. Hey there-

    I have a couple of questions. First off.. this plugin seems to be great solution. I am having a couple of problems, and am new to blogging, so bare with me. First, the movie I have uploaded doesn’t cue. I simply get the QT logo, and the movie never loads. Secondly, when entering the link into the post, I have to edit the html. Is this normal, and how can I get the movie to cue.

    check this link out:

    http://www.papercicada.com/blog/

    and i will check back soon.

    Thanks

    Sheriff

  19. Ahh.. I see what the problem is.

    The theme is just showing an “excerpt” of the last 2 posts. To get the video to display add this line to the plugin (quicktimepost.php file):
    add_filter(‘the_excerpt’,’quicktime_post’);

    I would make it the very last line (just before the ?>)

    I will add this into the next release of the plugin.

    Thanks for pointing it out.

  20. Hi,

    I think the autoplay-function does not work when using a poster-frame. The problem seems to be that all the parameters for the -tag apply to the poster-frame .mov-file but not the actual movie! (I.e. the movie which is ‘href-ed’ by the poster-frame movie.)

    Want I want in my case, however, is to be able to click on the poster-frame and the Quicktime-plugin should automatically load AND play the referenced movie. Unfortunately, this does not seem to work.

    Any ideas or am I doing something wrong here?

    Thanks,
    Thomas

  21. Hi Thomas,

    That should be the default autostart behavior.

    What happens when you try this one:
    http://www.mobvcasting.com/wp/?p=304
    ?

    Perhaps you could give a URL so that I could take a look?

    I would imagine that if the movie isn’t “Fast Start” that won’t work as the movie isn’t fully loaded. Also if it is a large file then the QuickTime player may not have downloaded enough for the start to work correctly and only plays a small part of the beginning before playing any more.

  22. Ahh.. I found another small bug:

    Line 76 in the plugin PHP should be as follows:
    list($file,$poster,$width,$height,$autoplay,$controller) = explode(” “,$tagargs);
    instead of:
    list($file,$poster,$width,$height,$poster,$autoplay,$controller) = explode(” “,$tagargs);

    I had $poster in there twice which may have effected people trying to use autoplay and controller variables.

    I will fix this in the next release..

  23. Hi,

    the video you posted behaves exactly like I feared. After clicking the poster image, the resulting movie does not play automatically. I’m currently experimenting with javascript to solve this…

    Since I’m working with local files at the moment the loading of the files should be of no concern.

    Thomas

  24. Strange.. On Safari, Firefox and IE on the Mac it behaves as it should, the video autoplays after clicking the poster image.

    What browser/OS are you trying with?

  25. Hi,

    I’ve tried the IE 7 beta, Firefox and Opera 9 under Windows. All of them do not start the video directly after clicking the poster frame. I do now have a solution using javascript but it is not as elegant as a direct configuration.

    Thomas

  26. Thomas,

    I just tried on IE 6 and Mozilla on a PC and it worked fine. I did have some problems with QuickTime and the browsers themselves but once I got the page to load the videos played after clicking on the poster frame.

    Not sure what the issue that you are having is related to.

    -s

  27. Hi Gideon,

    That is a pretty easy option to add but it does complicate the plugin a bit more than I would like with little benefit. Anything that is delivered via HTTP can be downloaded and saved. Kioskmode just makes that a bit more difficult for the individual who wants to save it.

    If you want to enable it yourself, add the following code around line 150:

    $tag_line = "<param name=\"KIOSKMODE\" VALUE=\"true\" />";
    $tags .= $tag_line . "\n";
    $script_tags .= "ourTags+='" . $tag_line . "';\n";

    and change this line (should be around line 170):

    $tag_line = " WIDTH=\"" . $width . "\" HEIGHT=\"" . $height . "\" AUTOPLAY=\"" . $autoplay . "\" PLUGINSPAGE=\"http://www.apple.com/quicktime/download/\">";

    to this:

    $tag_line = " WIDTH=\"" . $width . "\" HEIGHT=\"" . $height . "\" AUTOPLAY=\"" . $autoplay . "\" KIOSKMODE=\"true\" PLUGINSPAGE=\"http://www.apple.com/quicktime/download/\">";

    (make sure there aren’t line breaks)

    Note: This doesn’t add another true/false option, it turns kioskmode on for all videos using the plugin.

    I haven’t tested this so tread carefully..

    Best,
    shawn

  28. Ok. I gave up my wife for a night because I couldn’t figure out this problem. Thanks a ton for this! She will never forget this night. I know you wrote this plugin months ago, but anyway, here’s my thanks.

  29. Hi, great plugin but I have one problem related to my theme. Ironically, I use a theme similar to yours but for some reason it won’t show the quicktime. When I switch to another theme, it works fine. Was there something you needed to do with your theme’s CSS to make it fit a 320×240 quicktime? My site is http://www.jonirvine,com

Leave a comment

Your email address will not be published. Required fields are marked *