Video Embed & Thumbnail Generator WordPress Plugin

January 18th, 2011

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 Insert 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 your post that will embed a flexible Flash & HTML5 video player with a preview image into your post.

The embedded player 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 an HTML5 video element. I highly recommend 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.

I will no longer provide tech support for Flash video playback if you use a video that is not H.264 video and AAC audio. I’ve seen several people try to use MPEG-4 video in an mp4 container. This will not work. You must use H.264 video in an mp4 container. There are a few other formats that might work, but if you’re trying to use something else, you are on your own. If you ask me in the comments why your video doesn’t work, please post the video and audio codecs. MP4 or MOV is not a codec. To determine a file’s codecs on a Mac, select the file in and hit ⌘+i. Under “More Info” you will see “Codecs” listed. In Windows, use GSpot.

The plugin uses FFMPEG to generate thumbnails and encode HTML5/mobile videos. By default the plugin looks for FFMPEG in `/usr/local/bin` but if FFMPEG 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 is installed on your server, 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 9 at a time). The unused thumbnails will be deleted once you click “Insert into Post” or “Save Changes.”

In the plugin settings you can set the default maximum width based on the width 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 automatically adjusted to match the size and aspect ratio of the video file. You can make further adjustments if you want.

The “Encode” button is still a bit experimental. If you have FFMPEG on your server, clicking the button will start encoding an iPod/iPad/Android compliant H.264 video (which will also work in Safari and IE 9), or a Firefox/Chrome-compatible WEBM or OGV video in the same directory as your original file. Anyone using a modern browser who doesn’t have a Flash plugin will see these files instead of the original. 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. New in version 2.0, you will see the encoding progress, you will have the option to cancel an encoding job, and you should get an error message if something goes wrong. Closing the window will not cancel encoding, but once the window is closed the progress bar won’t come back. Users on Windows servers will not get any feedback while the files are encoding.

Also new in this version is the option to encode an HD Mobile/H.264 file. Since there are more devices that can handle HD H.264 videos available now, you can choose to increase the resolution to 720p or 1080p. Keep in mind, very few mobile devices can currently play 1080p video.

The plugin is currently favoring Flash instead of HTML5 because Flash is a better user experience in most cases. I’m particularly not a fan of some browsers’ tendencies to auto-download HTML5 video elements. I may eventually include the option to favor HTML5. However, if you embed a non-Flash compatible file (like an ogv or webm file) then you will only get the HTML5 video element. 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.webm and awesomevid.ogv as well. If you want to embed a high-res H.264 video but also make a mobile-compatible version available, add -ipod.m4v to the end of the filename (awesomevid-ipod.m4v) and it will be served up to most smartphones and tablets instead of the original.

Android viewers who don’t use Flash will see a play button superimposed on the thumbnail to make it a little clearer that it’s an embedded video.

If you have Mobile, WEBM, or OGV files encoded, you will have the option to embed one of those files instead of the original. This is for a small group of users who need to upload a file format that can’t be embedded and want to replace that file with a newly encoded file. No matter which option you choose, any other encoded files will still be automatically swapped in on the appropriate devices and browsers.

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, or maybe it’s hosted on another server. Either way, you can use the tab “Embed 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. If the video is in a directory that isn’t writable, any encodes you make will go to an “html5encodes” subdirectory in the WordPress uploads directory.

Once you’ve filled in all your options, click “Insert Flash Media Player” and you’ll get a shortcode in the visual editor that looks like this:

which translates to this:

Kyle Gilman Editor Reel


Right-click or ctrl-click this link to download.

Once you save the post, the thumbnail file will be registered in the WordPress media library and added to the post’s attachments. Thumbnails  are saved in the current WordPress uploads directory. HTML5 videos are not yet registered with the media library.

If you want to further modify the way the Flash video player works, you can add the following options inside the [FMP] 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"
  • controlbar="docked/floating/none" sets the controlbar position. HTML5 videos only respond to the “none” option.
  • loop="true/false"
  • autoplay="true/false"

These options will only affect Flash video elements. They will have no effect on HTML5 videos.

  • 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.

For example

[FMP 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/2011/10/Reel-11-10-10-web.mp4[/FMP]

 

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.

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.

I’m on shared hosting and can’t install software. Does this work without FFMPEG?

Some of it will work without FFMPEG. You can generate embed codes 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 generate HTML5 videos. 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.

Why doesn’t the encoding progress bar work on Windows servers?

Because I can’t figure out how to do it. Windows works a little differently from Linux, and I don’t understand it enough to get it to work.

Version history:

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

Entry Filed under: Tech,Web Video,WordPress

76 Comments Add your own

  • 1. Sean  |  March 3rd, 2011 at 5:48 pm

    This is a cool idea. If this can be incorporated into the post and use the thumbnail directly in a custom field, that will be even better. What do you think?

  • 2. Kyle  |  March 3rd, 2011 at 5:56 pm

    Well, the nature of custom fields is that they’re generally custom, right? What exactly would you want to do with the custom field in your template?

  • 3. Sean  |  March 3rd, 2011 at 6:42 pm

    for example, if one uses wordtube to insert video into a post, and we need a thumbnail generated from that video (either automatic or manual), do it all inside the post editor, and once thumbnail generated, then it automatically inserts the thumbnail file name inside the custom field in the post, so the post has a thumbnail associated to the video. Does this plugin works with flv file? I haven’t got a flv on hand to try it yet.

  • 4. Erwin  |  April 8th, 2011 at 1:36 pm

    Good start !
    I’ll come test it and come back on your blog ….

    erwin

  • 5. Erwin  |  April 8th, 2011 at 1:45 pm

    Good start !
    I’ll come test it and come back on your blog ….

    I am using TimThumb

    erwin

  • 6. Christian Sanchez  |  May 6th, 2011 at 4:47 pm

    This plugin seems to be what I need to generate thumbnails for use on a site that I’m developing. I will use the generated thumbnails in different sections of the site and also to show in the player before playing. The manner in which I am using it, I will have contributors upload the video from the front end and give them the option to generate the thumbnail. My only problem is that this plugin doesn’t have its own uploader. Does it make send to use the uploader from wordpress or this plugin to have its own uploader to make it easier for the users to not have to type in the url of the video?

    Is there a hack to include the core uploader to this plugin or have the plugin popup appear after someone has uploaded a video from wordpress’s uploader? Has anyone done this modification? If so, can you share it with me?

  • 7. Kyle  |  May 6th, 2011 at 4:52 pm

    Hi Christian, I agree that would be a useful thing for the plugin, but I never managed to figure out how to do it, and once it got good enough to work for my purposes, I moved on to other projects. If I get some time I’ll try to make that work eventually. What I usually do is use the core uploader and then copy and paste the URL into my plugin.

  • 8. kurima  |  July 4th, 2011 at 5:08 am

    Hi,

    Is FFMPEG must be installed? I just using hostgator sharing hosting, unfortunately they don’t have FFMPEG installed on sharing hosting, any solution for this problem?

    Trying to run in but got error problem on FFMPEG

  • 9. Kyle  |  July 4th, 2011 at 1:12 pm

    Yes, FFMPEG must be installed in order to make thumbnails or convert videos. There’s no way around that.

  • 10. Valerie  |  July 29th, 2011 at 10:45 am

    Aww… This would be a perfect plugin for what I need. I can’t find any other WordPress plugins that allow you to choose what the video thumbnail is. It’s annoying to have to upload a video and a separately created thumbnail image every time I upload a video. But I’m not sure if I have enough access to install this because my site is not self-hosted. I’ll have to see if there’s some way I can manage that… You should complete the set-up for this to put it in the WordPress plugin repository, I think it’d be incredibly useful to a lot of people (assuming it still works right?).

  • 11. Montalbano  |  October 20th, 2011 at 10:39 am

    This plugin seems to do exactly what I need. Will give it a try and maybe see if I can come up with some improvements (file uploading for example).

  • 12. Kyle  |  October 20th, 2011 at 10:50 am

    I’m hard at work on a new version which includes integration with the regular attachments system in WordPress. It’s much, much better. Should be done today or tomorrow.

  • 13. Kirk  |  October 20th, 2011 at 7:39 pm

    Hello,

    Noobie question here: I’m self hosting. Can you tell me where I can find FFMPEG and where I should put it? Do I put it in my root directory?

    The plugin looks incredible.

    Thanks,

    Kirk

  • 14. Kyle  |  October 20th, 2011 at 9:55 pm

    Kirk, installing FFMPEG is a bit of a trial if you’ve never installed a program on your server before. If you’re on shared hosting you might not be allowed to do it. But to start, FFMPEG is available at http://ffmpeg.org/

  • 15. Montalbano  |  October 21st, 2011 at 2:49 am

    Hi Kyle,

    Installed the new version of your plugin, the administration side looks awesome!

    I have issues displaying the video’s in the posts though:

    A lot of notices, for all defined options (seems it cannot load the defined constants):

    Notice: Use of undefined constant wp_FMP_http_streaming – assumed ‘wp_FMP_http_streaming’ in /home//domains//public_html/wp-content/plugins/video-embed-thumbnail-generator/video-embed-thumbnail-generator.php on line 151

    A couple of warnings about missing mdetect.php:

    Warning: include_once(/home//domains//public_html/wp-content/plugins/video-embed-thumbnail-generator/mdetect.php) [function.include-once]: failed to open stream: No such file or directory in /home//domains//public_html/wp-content/plugins/video-embed-thumbnail-generator/video-embed-thumbnail-generator.php on line 200

    And finally a fatal error:

    Fatal error: Class ‘uagent_info’ not found in /home//domains//public_html/wp-content/plugins/video-embed-thumbnail-generator/video-embed-thumbnail-generator.php on line 201

  • 16. Montalbano  |  October 21st, 2011 at 3:19 am

    Kyle,

    I downloaded a version of mdetect.php from sourceforge and added it to the plugin directory. That fixed the fatal error.

    The video’s are now showing. If I turn on debugging, the notices about undefined constants (see above) remain.

    Great job, very happy with your work!

  • 17. Kyle  |  October 21st, 2011 at 3:40 pm

    I think version 1.0.2 has fixed the problems Montalbano found. Keep that feedback coming! More specifically, is anyone out there actually using the plugin with FFMPEG?

  • 18. Zachary  |  October 25th, 2011 at 11:24 pm

    Very cool mod .. I”m having a problem making thumbs from mp4 file .. it says ‘can’t open movie file’ but it does quite fine with an avi file. These are all uploaded via the add video link

    I tested ffmpeg from command line and it can make a thumb from the same mp4 file so I don’t think it’s an issue with ffmpeg. i’ll dig into it when I get a chance but if you have a chance please give me some pointers

    thanks a lot for your work

    -Zachary

  • 19. Kyle  |  October 27th, 2011 at 3:25 pm

    We got to the bottom of Zachary’s problems over email. His server didn’t have the mp4 MIME type set up. I’ve added instructions for adding MIME types to your configuration.

  • 20. Zachary  |  October 27th, 2011 at 3:37 pm

    I never even thought about that.. totally explains why over url it would fail but from command line it wouldn’t. you are the man

    I added
    video/mp4 mp4
    video/mp4 m4v
    video/webm webm

    to /etc/mime.types and reloaded apache

    tada! Works great now.. Clearly not a problem with your module but I was using the default with centos 5 so probably a lot of folk don’t have that setting

    cheers

  • 21. Montalbano  |  October 29th, 2011 at 6:48 am

    Hi Kyle,

    Just updated to the latest version. I really love this plugin, it is exactly how it should be in WordPress by default.

    One small issue I found while converting and making thumbnails for some older movies. When converting movies from 2009 for instance, the encoded movies are being stored in the same folder as the original (in this case /uploads/2009/01). But the generated thumbnail gets stored in the folder of the current month (/uploads/2011/10). Is that done by purpose?
    Also, the thumbnail does not show, as the filename has a trailing “_thumb5.jpg”.

  • 22. Montalbano  |  October 29th, 2011 at 6:59 am

    Update on my latest comment.

    When choosing a movie from the media library, the “insert” button does not always show (I have my WordPress on Dutch so maybe it is called different in English).
    The button does show for the first say 25 movies in the Media library, but on any movie after that it just does not appear anymore.
    It is the button to generate the [FPM] code to the message.

    Hope you can make something of my comment…

  • 23. Montalbano  |  October 29th, 2011 at 8:00 am

    Another “minor”, when adding multiple video’s to a post, without titles or text, the video’s are being “glued” to each other without any white space between them.
    Only workaround seems to be to add a between the FPM tags in the posts HTML body.

  • 24. Steven Hoff  |  October 29th, 2011 at 8:28 am

    Is there are a way to have a single video in a WordPress page automatically start when the page loads?

  • 25. Steven Hoff  |  October 29th, 2011 at 8:40 am

    Nevermind. I looked through the source and added autoplay=”true” to the FPM shortcode. You should add some documentation or add to the video insert code an option for this. Most users won’t see how to do things like this on their own.

  • 26. Montalbano  |  October 29th, 2011 at 11:13 am

    @Steven, you can set this behaviour in the plug-in settings.

  • 27. Kyle  |  October 29th, 2011 at 1:30 pm

    if you turn on autoplay in the plugin settings it will make every video autoplay, which I think is not what Steven wanted. I had honestly forgotten about the various options you can use in the shortcode, but it is worth documenting everything. I’ll add that to the instructions.

  • 28. Matthew  |  November 4th, 2011 at 11:53 am

    Please can you tell me where to add these lines in my .htaccess file through my host. I would love to have this plugin

    AddType video/ogg.ogv
    AddType video/mp4.mp4
    AddType video/mp4.m4v
    AddType video/webm.webm

  • 29. Kyle  |  November 4th, 2011 at 12:01 pm

    Matthew, I believe your host is iPage, which I think at least has mp4 set up correctly. But just in case you can edit your .htaccess file following these instructions. http://www.ipage.hostrehearsal.com/knowledgebase/read_article.bml?kbid=2627

  • 30. Runner2009  |  November 5th, 2011 at 5:10 pm

    Just installed FFMEPG into centOS5

    I am using hosted mp4 videos on Amazon S3, When I try to generate the thumbnails I get the following error message

    Can’t open movie file.

    The videos permissions are set correctly on Amazon and I can both play and download them.

    Any ideas?

    Great plugin really!!!!

  • 31. Zachary  |  November 6th, 2011 at 12:30 am

    Runner I’ve had similar problems with s3 — you have to set the mime type during upload see
    http://stackoverflow.com/questions/3213371/setting-mime-type-on-s3-object

    and/or
    http://www.bucketexplorer.com/faq/how-to-manage-mime-types.html

    or you’ll have the same problem I had — without the mime type set by the serving host, ffmpeg can’t deal with a file over an url (but it’d be fine using a local file).

    hope that helps

    -zachary

  • 32. Kyle  |  November 6th, 2011 at 5:59 pm

    Zachary makes a good point about setting MIME types on S3. It’s also important to not use the https link that Amazon gives you for the file. Change it to http and FFMPEG should be able to open the file. Runner2009 also identified a problem with the last version that made the generated thumbnails disappear when using the “Embed from URL” tab. I just released 1.0.5 which should fix that issue.

  • 33. Curly  |  November 11th, 2011 at 7:23 am

    This is really a great plugin and I think it surpasses other video embedding plugins available. It would be very very very great if you can have the default media uploader of wordpress incorporated in your plugin.

    Great plugin. More power to you.

  • 34. Kyle  |  November 11th, 2011 at 4:14 pm

    Curly, have you used the plugin with the media uploader? It is integrated as much as I thought anyone could want. What are you looking for specifically?

  • 35. Denise  |  November 16th, 2011 at 10:49 pm

    Thank you for this plugin!!

    I’m having a bit of a problem – the video isn’t showing…but the audio seems to works fine. I’m using a poster image, and that is working fine as well. I’m using a url to pull the video as the mp4 file size was too large, so I ftp’s it up… I would appreciate any help.

  • 36. Denise  |  November 17th, 2011 at 1:46 am

    Do I need to have ffmpeg installed? Can you point me in the right direction – that;s a bit out of my realm of knowledge. Oddly enough it works on my iphone?

    Hmm.

    Thanks again.

  • 37. Kyle  |  November 17th, 2011 at 12:05 pm

    Denise was using an mp4 video with the MPEG-4 video codec. It seems like MPEG-4 would be a natural fit for an mp4 video, but the Flash video player only works with H.264 video in the mp4 container.

  • 38. Curly  |  November 23rd, 2011 at 5:28 am

    Hi Kyle,

    Sorry I was a little confused with what I posted. Anyway is there any way that we can track the number of times that the video was played?

    Thanks.

    Regards,
    Harry

  • 39. franck benedetti  |  November 23rd, 2011 at 11:56 pm

    I would like to make a gallery of thumbnails. Then, when one is clicked on the video player will pop up on the same page and play. is it possible to do this with this plugin?

    Thank you,
    Franck

  • 40. Kyle  |  November 26th, 2011 at 7:46 pm

    @Curly. That’s worth looking in to. I might be able to keep track of it in the WordPress database, but there are a lot of different ways that someone can hit play and it will take some time to come up with ways to catch them all. For now, you can get that information from your host’s web stats.

    @franck Short answer: no. Long answer: yes, with a LOT of custom template work on your end.

  • 41. Curly  |  November 27th, 2011 at 11:15 am

    Thanks kyle! I’ll look into it.

  • 42. Laura  |  December 4th, 2011 at 8:33 pm

    Hi. Wondering if you can help me. I’m running WP on a shared FFMPEG server at HostUpon. I just created a clean install of WP and installed this plugin to test….

    The thumbnails aren’t rendering (although it seems to be trying — 4 blank squares appear then dissapear), and althought the video embeds into a post, there is no audio when it plays.

    Any suggestions on how to get this working. OR, a recommendation for a reliable shared hosting provider where this plugin is known to work?

    Thanks in advance!

  • 43. Laura  |  December 4th, 2011 at 11:22 pm

    Hi again. I just set up a WP test site on another FFMPEG shared host: Certified Hosting. This time, I’ve got the thumbnails generating, but I still have no sound. Any suggestions?

  • 44. Xenia Suaiden  |  December 7th, 2011 at 2:39 am

    Hi Kyle,
    The plugin works great on posts and pages, but I was hoping to add it directly into the home.php file. What would the php template code be? Sigh…maybe I’m just working too late.

  • 45. Kyle  |  December 7th, 2011 at 5:26 pm

    @Xenia, I think it would be like this: `< ?php echo do_shortcode('[FMP poster="http://yourdomain.com/image.jpg"]http://yourdomain.com/video.mp4[/FMP]'); ?>‘

  • 46. Kyle  |  December 7th, 2011 at 5:30 pm

    BTW, Laura’s audio was not AAC. If you’re having trouble playing the videos, look at how you’re encoding them. H.264 video, AAC audio are the best options.

  • 47. stephen  |  December 13th, 2011 at 12:20 pm

    Hi, I tried to embed an mp4 that I uploaded. Everything works as far as embedding, dimensions and even generating the thumbnail and encoding, but in every browser I look at it in (chrome, safari, firefox) I get the following message after clicking the play button”

    “We are having problems with playback. We apologize for the inconvenience”

    And I have set up the mime types in .htaccess just to be safe. Any ideas?

    Thanks!

  • 48. Kyle  |  December 16th, 2011 at 9:08 am

    Stephen’s problem was a codec issue. The MPEG-4 video codec will not work. You have to use H.264. If you get that error message, it’s usually because you are using an unsupported video codec.

  • 49. Rafael  |  December 21st, 2011 at 9:51 am

    Can’t see video in IE8

    Only link to download appeared.
    It works fine in FF and Chrome, but nothing (nor a black box) appear in IE. Flash is updated too.

    What’s the problem?

    THANK YOU

    Note: This is the code:
    [FMP width="608" height="undefined"]http://www.dip-badajoz.es/ficheros/agenda/video/20111221140537_v1.ogv[/FMP]
    Right-click or ctrl-click this link to download

  • 50. Kyle  |  December 21st, 2011 at 9:55 am

    @Rafael OGV isn’t supported by IE. http://en.wikipedia.org/wiki/HTML5_video#Table

  • 51. joschi  |  December 21st, 2011 at 7:09 pm

    hi :)

    first thing first: great plugin, thanks :)

    unfortunately i have one question and one problem:

    if i hit the generate thumbnai lbutton there apears a “Loading…” witch wont finish! ive looket at my rootserver and found the right amount of thumbnails generatet, but they wont show up in my wordpress medialibrary nether in the add video tab… i cant find a solution for myelf… server is running a debian, wordpressversion is 3.3.

    and the question: is it possible to show a preview image of the video in the player before the viewer start the video like in youtube?

    thanks so long and greetings from berlin
    joschi

  • 52. H Quintana  |  December 22nd, 2011 at 11:48 pm

    I just loaded the plugin into word press, I’m using MAMP to view it on my macbook pro, I put the information in the url and do the generate thumbnail, and I get the error can’t find FFMEPG message. I found the folder in my directory, but not sure how to get it to work. I tried copy /paste the info from the finder, but that didn’t work. On my page it shows the slider and the title, but no video or thumbnail. I’m using a theme I purchased from theme forest called Core. Can you direct me as to what to do. Thanks

  • 53. Jeremy  |  January 8th, 2012 at 5:35 am

    Hi Kyle, great plugin, thanks for making it available.

    I think I am facing a problem similar to Runner2009 or Zachary. I am trying to get thumbnails of vidoes posted in Youtube / Dailymotion. But on clicking on “Generate”, I am getting “Can’t open movie file” message. The link to youtube or dailymotion video is put in the field “Video url”, going through “Embed from URL”.

    AddType video/ogg .ogv
    AddType video/mp4 .mp4
    AddType video/mp4 .m4v
    AddType video/webm .webm
    - is also added to .htaccess just below # END WordPress

    Besides, “Insert to post” button does nothing. My wordpress is 3.x

    So it’s me doing something wrong or there is something else?

    Thanks again
    Jeremy

  • 54. Kyle  |  January 8th, 2012 at 11:06 am

    The plugin doesn’t work with YouTube or Dailymotion or similar video hosting sites. The URLs for those sites don’t actually point to a video file, they link to a web page or an array of videos. YouTube videos already have thumbnails and WordPress already has a system for embedding YouTube videos. If my plugin pulled content from YouTube, created a new thumbnail and saved it on a user’s server I don’t think it would take long for Google to get mad about that and I like to make Google happy.

    The problem with the “Insert into Post” button in the Embed from URL tab seems to show up when you’re in HTML view mode. That will be fixed in a new version coming very soon.

  • 55. Jeremy  |  January 8th, 2012 at 12:25 pm

    Hmmm … thanks for the explanation Kyle :)

  • 56. Mike  |  January 14th, 2012 at 10:36 am

    I installed everything and my videos are H.264 and AAC but no video. When i got to encode the video when I insert it into post I get this output:

    FFMPEG missing library ‘libfaac’ or ‘libx264′ required for iPod encoding.

    I think its not encoding the H.264 for flash correctly? how do I fix this?

    Im on windows IIS7 server, with full access to system. I installed the latest ffmpeg.

  • 57. Kyle  |  January 14th, 2012 at 4:49 pm

    Mike has uncovered a couple issues. First, the file he was using was shot on a Samsung Galaxy S, which seems to shoot H.264 with AAC audio, but the video format is actually 3GP4, which doesn’t work in the Flash video player. If you’re shooting anything with a Samsung Galaxy S you’ll need to transcode the files to get them to play.

    Second, there is more than one way to encode AAC audio. I’m working on a new version that will use libfaac or libvo-aacenc to encode AAC audio depending on what you have installed.

    Third, I made a lazy decision that led to the “Encode” button not really working on Windows IIS servers. I’m also going to fix that up soon.

  • 58. steve  |  January 16th, 2012 at 10:11 pm

    I cant get this to work. I keep getting “can’t open movie file” error. I’ve added the mime types to the mime.types and the .htacces and made sure my path is correct. also, i can generate thumbnails with ffmpeg directly. please help!

  • 59. Tony  |  January 22nd, 2012 at 4:53 pm

    hi there is a italian translation ?

  • 60. Kailas  |  January 23rd, 2012 at 10:49 pm

    I have FFMPEG at usr/local/bin, and installed the codecs at

    /usr/local/lib/libtheora.so.0.3.3
    /usr/local/lib/libvorbis.so.0.4.0

    But I get an error that the plugin cannot find the libs. Any ideas?

    Peace,

    Kailas.

  • 61. Kyle  |  January 24th, 2012 at 10:36 am

    @Kailas It’s not enough to install the codecs, you also have to configure ffmpeg with the –enable-vorbis and –enable-theora switches and recompile.

  • 62. Kyle  |  January 24th, 2012 at 10:46 am

    @Tony it’s English only, sorry. I don’t have plans for any translations.

  • 63. Tony  |  January 24th, 2012 at 10:48 am

    never mind thanks a lot !

  • 64. Kailas  |  January 25th, 2012 at 4:47 am

    Thank you for the -enable commands. That worked to remedy the error, and I got the message “Encoding WEBM… Encoding OGV…’ but in the /uploads/html5encodes directory the encoded files were just 0kb. Do you have any idea of what might make that happen?

    One other error, which I presume would not affect the encoding that it said it was doing, is that I still have to install and enable ‘libfaac’ or ‘libx264′. Should have that done on Weds. But that should not have made a difference for the other files, right?

  • 65. Kailas  |  January 25th, 2012 at 4:49 am

    The other point is that these QT videos are only about ten meg each. So it should only take fifteen minutes to encode, right?

  • 66. Kailas  |  January 26th, 2012 at 4:17 pm

    Regarding #65, we determined it was a compile error on the server. Hoping to resolve soon.

  • 67. Frank  |  February 1st, 2012 at 4:12 pm

    get error on generating thumbnails :

    Can’t open movie file.

    but the movie file works fine …

    Help very appreciated.
    Regards,
    Frank

  • 68. Kyle  |  February 1st, 2012 at 5:10 pm

    Frank has .htaccess password protection on his site and FFMPEG is unable to access the video. You can get around it by using the Embed from URL tab. Use the format http://username:password@yourdomain.com/uploads/2012/01/awesomevid.mp4 in the Video URL field.

  • 69. Kiel  |  February 3rd, 2012 at 6:52 pm

    How long should it take to convert the video? I have the ffmpeg installed and it says Encoding Mobile M4V… but it just sits there. Nothing is happening. Do I have to wait for it to complete before inserting it into the post? I know everything is set up because I can convert using my own script and it works fine.

    I am trying to convert an .avi file. Is this the issue?

    Thanks.

  • 70. Kyle  |  February 4th, 2012 at 1:01 pm

    @Kiel. The encoding function is a bit experimental. As it says in the instructions on this page, the plugin will not tell you if there is an error in the encoding or if it’s done. The length of time it takes to encode depends on your processor speed, the length, and resolution of the video. Also, you can’t embed AVI files, so make sure you change the embed code (after inserting) to whaevervideofilename-ipod.m4v

  • 71. matt  |  February 13th, 2012 at 5:38 pm

    I got an error after successfully generating thumbnails

    Notice: Use of undefined constant generate – assumed ‘generate’ in line kg_callffmpeg.php on line 121
    Notice: Use of undefined constant generate – assumed ‘generate’ in line kg_callffmpeg.php on line 138

    any ideas?

    thanks
    Matt

  • 72. Kyle  |  February 13th, 2012 at 6:00 pm

    @matt That’s my bad programming. “generate” wasn’t enclosed in quotes. It’s fixed in the new version coming out soon. But I’m surprised that error is showing up in your browser and not in your error logs or just ignored altogether. Did it cause any problems for you?

  • 73. matt  |  February 13th, 2012 at 6:17 pm

    @kyle – Yes I don’t see a list of thumbnails that previously generated by ffmpeg inside worpdress add media modal box.

  • 74. matt  |  February 13th, 2012 at 6:26 pm

    @kyle – i found the solution. i added the code below inside kg_callffmpeg.php.(before Process class) and everything is working fine now.

    define(‘generate’,'generate’);
    define(‘submit’,'submit’);
    define(‘encode’,'encode’);
    define(‘delete’,'delete’);

  • 75. Bill  |  February 21st, 2012 at 4:10 pm

    In video-embedthumbnail-generator.php in kg_check_ffmpeg_exists() there is a line
    if ( $exec_enabled == true && strpos(end($output), ‘even better’) != false ) { //if FFMPEG executed

    This was failing for me even though I have ffmpeg installed and working. I am not sure why it was done this way but I changed it to look for FFmpeg as the first thing in the response from the exec and it is working fine.

    Maybe there is a better way to do this besides looking for a phrase in the exec response?

  • 76. Kyle  |  February 21st, 2012 at 4:30 pm

    @Bill, yes, I did that last night and it worked on two different installs, but that was a dumb way to do it. I’m just going to check that the file exists.

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Films

Loading...